discourse/app/assets/javascripts/admin/addon/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
381 B
JavaScript
Raw Normal View History

2020-03-24 16:18:56 -04:00
import Route from "@ember/routing/route";
import { ajax } from "discourse/lib/ajax";
2020-03-24 16:18:56 -04: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-24 16:18:56 -04:00
},
});