discourse/app/assets/javascripts/admin/addon/routes/admin-plugins.js

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

13 lines
357 B
JavaScript
Raw Normal View History

import Route from "@ember/routing/route";
import { service } from "@ember/service";
import AdminPlugin from "admin/models/admin-plugin";
export default class AdminPluginsRoute extends Route {
@service router;
async model() {
const plugins = await this.store.findAll("plugin");
return plugins.map((plugin) => AdminPlugin.create(plugin));
}
}