discourse/app/assets/javascripts/admin/routes/admin-api-keys-new.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
377 B
JavaScript
Raw Normal View History

2020-03-25 04:18:56 +08:00
import Route from "@ember/routing/route";
import { ajax } from "discourse/lib/ajax";
2020-03-25 04:18:56 +08:00
export default Route.extend({
model() {
return this.store.createRecord("api-key");
},
setupController(controller, model) {
ajax("/admin/api/keys/scopes.json").then(data => {
controller.setProperties({
scopes: data.scopes,
model
});
});
2020-03-25 04:18:56 +08:00
}
});