mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-05-24 01:12:54 -04:00
* remove fetch / use axios fix #1077 * revert checkbox change * add password peek * fix bool check
17 lines
464 B
TypeScript
17 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;
|
|
}
|