mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-28 23:14:04 -04:00
FIX: generate API key not working
This commit is contained in:
parent
97ba06d954
commit
f64de0c41e
3 changed files with 5 additions and 4 deletions
app/assets/javascripts/admin
|
@ -1,3 +0,0 @@
|
||||||
Discourse.AdminApiController = Ember.Controller.extend({
|
|
||||||
|
|
||||||
});
|
|
|
@ -11,6 +11,10 @@ Discourse.AdminApi = Discourse.Model.extend({
|
||||||
Discourse.ajax(Discourse.getURL('/admin/api/generate_key'),{type: 'POST'}).then(function (result) {
|
Discourse.ajax(Discourse.getURL('/admin/api/generate_key'),{type: 'POST'}).then(function (result) {
|
||||||
adminApi.set('key', result.key);
|
adminApi.set('key', result.key);
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
regenerateKey: function(){
|
||||||
|
alert(Em.String.i18n('not_implemented'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!-- Hold off on localizing for a few days while I finalize this page -->
|
<!-- Hold off on localizing for a few days while I finalize this page -->
|
||||||
<h3>API Information</h3>
|
<h3>API Information</h3>
|
||||||
{{#if content.keyExists}}
|
{{#if content.keyExists}}
|
||||||
<strong>Key:</strong> {{content.key}} <button {{action regenerateKey}}>Regenerate API Key</button>
|
<strong>Key:</strong> {{content.key}} <button {{action regenerateKey target="content"}}>Regenerate API Key</button>
|
||||||
<p>Keep this key <strong>secret</strong>, all users that have it may create arbirary posts on the forum as any user.</p>
|
<p>Keep this key <strong>secret</strong>, all users that have it may create arbirary posts on the forum as any user.</p>
|
||||||
{{else}}
|
{{else}}
|
||||||
<p>Your API key will allow you to create and update topics using JSON calls.</p>
|
<p>Your API key will allow you to create and update topics using JSON calls.</p>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue