discourse/app/assets/javascripts/admin/addon/routes/admin-plugins.js
2024-03-06 18:05:11 +01:00

14 lines
357 B
JavaScript

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;
model() {
return this.store
.findAll("plugin")
.then((plugins) => plugins.map((plugin) => AdminPlugin.create(plugin)));
}
}