diff --git a/models/db.js b/models/db.js index b5fb3a8..a0d2950 100644 --- a/models/db.js +++ b/models/db.js @@ -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, diff --git a/models/migrations/02-users-add-api-token.js b/models/migrations/02-users-add-api-token.js new file mode 100644 index 0000000..ca8d67f --- /dev/null +++ b/models/migrations/02-users-add-api-token.js @@ -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') + ]) + } +} diff --git a/public/javascripts/spacedeck_users.js b/public/javascripts/spacedeck_users.js index 7f2a9ad..3efa13a 100644 --- a/public/javascripts/spacedeck_users.js +++ b/public/javascripts/spacedeck_users.js @@ -17,7 +17,6 @@ SpacedeckUsers = { loading_user: false, password_reset_confirm_error: "", password_reset_error: "", - }, methods:{ load_user: function(on_success, on_error) { diff --git a/views/partials/account.html b/views/partials/account.html index 5f94649..450196b 100644 --- a/views/partials/account.html +++ b/views/partials/account.html @@ -55,6 +55,15 @@
+
+ + +
@@ -67,18 +76,17 @@
- +
- +
+