1
0
Fork 0
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:
Hayden 2021-09-02 11:24:17 -08:00 committed by GitHub
parent c7f8c96287
commit abc0d0d59f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 317 additions and 275 deletions

View file

@ -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());