mirror of
https://github.com/spacedeck/spacedeck-open.git
synced 2025-12-15 09:27:31 +01:00
users: add api_token attribute, make editable in profile/account
This commit is contained in:
@@ -42,6 +42,7 @@ module.exports = {
|
||||
avatar_thumb_uri: Sequelize.STRING,
|
||||
confirmation_token: Sequelize.STRING,
|
||||
password_reset_token: Sequelize.STRING,
|
||||
api_token: Sequelize.STRING,
|
||||
home_folder_id: Sequelize.STRING,
|
||||
prefs_language: Sequelize.STRING,
|
||||
prefs_email_notifications: Sequelize.STRING,
|
||||
|
||||
19
models/migrations/02-users-add-api-token.js
Normal file
19
models/migrations/02-users-add-api-token.js
Normal file
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
up: function(migration, DataTypes) {
|
||||
return Promise.all([
|
||||
migration.addColumn('users', 'api_token',
|
||||
{
|
||||
type: DataTypes.STRING
|
||||
}
|
||||
)
|
||||
])
|
||||
},
|
||||
|
||||
down: function(migration, DataTypes) {
|
||||
return Promise.all([
|
||||
migration.removeColumn('users', 'api_token')
|
||||
])
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user