mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-05-24 01:12:54 -04:00
* fix old ref * capture git commit as build ID * generate new types * display build on Site Settings page * fix extras crash it extras is none
42 lines
904 B
TypeScript
42 lines
904 B
TypeScript
import { BaseAPI } from "../_base";
|
|
import { AdminAboutInfo } from "~/types/api-types/admin";
|
|
|
|
const prefix = "/api";
|
|
|
|
const routes = {
|
|
about: `${prefix}/admin/about`,
|
|
aboutStatistics: `${prefix}/admin/about/statistics`,
|
|
check: `${prefix}/admin/about/check`,
|
|
};
|
|
|
|
|
|
export interface AdminStatistics {
|
|
totalRecipes: number;
|
|
totalUsers: number;
|
|
totalGroups: number;
|
|
uncategorizedRecipes: number;
|
|
untaggedRecipes: number;
|
|
}
|
|
|
|
export interface CheckAppConfig {
|
|
emailReady: boolean;
|
|
baseUrlSet: boolean;
|
|
isSiteSecure: boolean;
|
|
isUpToDate: boolean;
|
|
ldapReady: boolean;
|
|
}
|
|
|
|
export class AdminAboutAPI extends BaseAPI {
|
|
async about() {
|
|
return await this.requests.get<AdminAboutInfo>(routes.about);
|
|
}
|
|
|
|
async statistics() {
|
|
return await this.requests.get(routes.aboutStatistics);
|
|
}
|
|
|
|
async checkApp() {
|
|
return await this.requests.get<CheckAppConfig>(routes.check);
|
|
}
|
|
}
|