c32d7d7486
* feat(frontend): ✨ add user recipe export functionality * remove depreciated folders * change/remove depreciated folders * add testing variable in config * add GUID support for group_id * improve testing feedback on 422 errors * remove/cleanup files/folders * initial user export support * delete unused css * update backup page UI * remove depreciated settings * feat: ✨ export download links * fix #813 * remove top level statements * show footer * add export purger to scheduler * update purge glob * fix meal-planner lockout * feat: ✨ add bulk delete/purge exports * style(frontend): 💄 update UI for site settings * feat: ✨ add version checker * update documentation Co-authored-by: hay-kot <hay-kot@pm.me>
51 lines
1 KiB
TypeScript
51 lines
1 KiB
TypeScript
import { BaseAPI } from "../_base";
|
|
|
|
const prefix = "/api";
|
|
|
|
const routes = {
|
|
about: `${prefix}/admin/about`,
|
|
aboutStatistics: `${prefix}/admin/about/statistics`,
|
|
check: `${prefix}/admin/about/check`,
|
|
};
|
|
|
|
export interface AdminAboutInfo {
|
|
production: boolean;
|
|
version: string;
|
|
demoStatus: boolean;
|
|
apiPort: number;
|
|
apiDocs: boolean;
|
|
dbType: string;
|
|
dbUrl: string;
|
|
defaultGroup: string;
|
|
versionLatest: string;
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|