mirror of
https://github.com/hay-kot/mealie.git
synced 2025-07-07 13:32:21 -07:00
* remove fetch / use axios fix #1077 * revert checkbox change * add password peek * fix bool check
16 lines
464 B
TypeScript
16 lines
464 B
TypeScript
import { ref, Ref, useAsync, useContext } from "@nuxtjs/composition-api";
|
|
import { useAsyncKey } from "../use-utils";
|
|
import { AppInfo } from "~/types/api-types/admin";
|
|
|
|
export function useAppInfo(): Ref<AppInfo | null> {
|
|
const appInfo = ref<null | AppInfo>(null);
|
|
|
|
const { $axios } = useContext();
|
|
|
|
useAsync(async () => {
|
|
const data = await $axios.get<AppInfo>("/api/app/about");
|
|
appInfo.value = data.data;
|
|
}, useAsyncKey());
|
|
|
|
return appInfo;
|
|
}
|