From f64de0c41e31eba00284af25e52e9e2f5ee9b047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Tue, 16 Apr 2013 00:04:12 +0200 Subject: [PATCH] FIX: generate API key not working --- .../javascripts/admin/controllers/admin_api_controller.js | 3 --- app/assets/javascripts/admin/models/admin_api.js | 4 ++++ app/assets/javascripts/admin/templates/api.js.handlebars | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 app/assets/javascripts/admin/controllers/admin_api_controller.js diff --git a/app/assets/javascripts/admin/controllers/admin_api_controller.js b/app/assets/javascripts/admin/controllers/admin_api_controller.js deleted file mode 100644 index 116595e6399..00000000000 --- a/app/assets/javascripts/admin/controllers/admin_api_controller.js +++ /dev/null @@ -1,3 +0,0 @@ -Discourse.AdminApiController = Ember.Controller.extend({ - -}); diff --git a/app/assets/javascripts/admin/models/admin_api.js b/app/assets/javascripts/admin/models/admin_api.js index 74ea830b45e..5b1bde817a3 100644 --- a/app/assets/javascripts/admin/models/admin_api.js +++ b/app/assets/javascripts/admin/models/admin_api.js @@ -11,6 +11,10 @@ Discourse.AdminApi = Discourse.Model.extend({ Discourse.ajax(Discourse.getURL('/admin/api/generate_key'),{type: 'POST'}).then(function (result) { adminApi.set('key', result.key); }); + }, + + regenerateKey: function(){ + alert(Em.String.i18n('not_implemented')); } }); diff --git a/app/assets/javascripts/admin/templates/api.js.handlebars b/app/assets/javascripts/admin/templates/api.js.handlebars index 969f060b3ee..fb264b6602f 100644 --- a/app/assets/javascripts/admin/templates/api.js.handlebars +++ b/app/assets/javascripts/admin/templates/api.js.handlebars @@ -1,7 +1,7 @@

API Information

{{#if content.keyExists}} - Key: {{content.key}} + Key: {{content.key}}

Keep this key secret, all users that have it may create arbirary posts on the forum as any user.

{{else}}

Your API key will allow you to create and update topics using JSON calls.