mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-11-03 18:53:17 -05:00 
			
		
		
		
	* fix(frontend): 🐛 update dialog implementation to simplify state management * test(backend): ✅ refactor test fixtures + admin group tests * chore(backend): 🔨 add launcher.json for python debugging (tests) * fix typing * feat(backend): ✨ refactor/fix group management for admins * feat(frontend): ✨ add/fix admin group management * add LDAP checker Co-authored-by: hay-kot <hay-kot@pm.me>
		
			
				
	
	
		
			50 lines
		
	
	
		
			1022 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1022 B
		
	
	
	
		
			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;
 | 
						|
}
 | 
						|
 | 
						|
export interface AdminStatistics {
 | 
						|
  totalRecipes: number;
 | 
						|
  totalUsers: number;
 | 
						|
  totalGroups: number;
 | 
						|
  uncategorizedRecipes: number;
 | 
						|
  untaggedRecipes: number;
 | 
						|
}
 | 
						|
 | 
						|
export interface CheckAppConfig {
 | 
						|
  emailReady: boolean;
 | 
						|
  baseUrlSet: boolean;
 | 
						|
  isSiteSecure: 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);
 | 
						|
  }
 | 
						|
}
 |