From 19850b1d20ba52ade723c45707d6661f324005af Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Mon, 9 Mar 2015 18:03:25 +0100 Subject: [PATCH] added GUI to change API keys --- client/client.coffee | 6 +++++- client/view/templates.html | 10 +++++++++- server/api.coffee | 5 +++-- server/server.coffee | 13 ++++++++----- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/client/client.coffee b/client/client.coffee index e998a47..9e65945 100644 --- a/client/client.coffee +++ b/client/client.coffee @@ -168,12 +168,16 @@ Template.menu.events # Account Page Template.account.helpers dateformat: -> if getUser() then return getUser().dateformat + apikey: -> if getUser() then return getUser().apiKey Template.account.events 'click #reset-settings': (e,t) -> t.find('#set-date-format').value = "MM/DD/YYYY" + t.find('#set-api-key').value = '' 'click #save-settings': (e,t) -> Meteor.users.update getUser()._id, - $set: dateformat: t.find('#set-date-format').value + $set: + dateformat: t.find('#set-date-format').value + apiKey: t.find('#set-api-key').value showError msg: 'Settings saved', type: 'success' 'click #btn-logout': -> Meteor.logout logoutCallback 'click #btn-delete-me': -> deleteAccount() diff --git a/client/view/templates.html b/client/view/templates.html index 3efb238..c6caf33 100644 --- a/client/view/templates.html +++ b/client/view/templates.html @@ -161,9 +161,17 @@