mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 19:51:24 +08:00
18 lines
381 B
JavaScript
18 lines
381 B
JavaScript
import Route from "@ember/routing/route";
|
|
import { ajax } from "discourse/lib/ajax";
|
|
|
|
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,
|
|
});
|
|
});
|
|
},
|
|
});
|