mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-21 14:19:41 +02:00
refactor(♻️): update 'about' page to new composition API (#667)
* test-commit * Remove PR Name Checker * refactor(backend): ♻️ split unrelated routes into clearer router paths Add an /app and /admin router base paths to split previously grouped public/admin data into different paths. Part of a longer migration to move 'admin' operations under the admin path. * refactor(backend): ♻️ rename imports * refactor(frontend): ♻️ refactor frontend API and Pages to refelect new API design Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
parent
c7f8c96287
commit
abc0d0d59f
23 changed files with 317 additions and 275 deletions
|
@ -94,7 +94,7 @@
|
|||
<script lang="ts">
|
||||
import { defineComponent, useAsync } from "@nuxtjs/composition-api";
|
||||
import AdminEventViewer from "@/components/Domain/Admin/AdminEventViewer.vue";
|
||||
import { useApiSingleton } from "~/composables/use-api";
|
||||
import { useAdminApi, useApiSingleton } from "~/composables/use-api";
|
||||
import { useAsyncKey } from "~/composables/use-utils";
|
||||
|
||||
export default defineComponent({
|
||||
|
@ -103,9 +103,11 @@ export default defineComponent({
|
|||
setup() {
|
||||
const api = useApiSingleton();
|
||||
|
||||
const adminApi = useAdminApi();
|
||||
|
||||
function getStatistics() {
|
||||
const statistics = useAsync(async () => {
|
||||
const { data } = await api.debug.getAppStatistics();
|
||||
const { data } = await adminApi.about.statistics();
|
||||
return data;
|
||||
}, useAsyncKey());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue