mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-30 17:53:31 -04:00 
			
		
		
		
	* style(frontend): 💄 add darktheme custom * add dummy users in dev mode * feat(frontend): ✨ add group permissions editor UI * feat(backend): ✨ add group permissions setters * test(backend): ✅ tests for basic permission get/set (WIP) Needs more testing * remove old test * chore(backend): copy template.env on setup * feat(frontend): ✨ enable send invitation via email * feat(backend): ✨ enable send invitation via email * feat: ✨ add app config checker for site-settings * refactor(frontend): ♻️ consolidate bool checks Co-authored-by: Hayden <hay-kot@pm.me>
		
			
				
	
	
		
			48 lines
		
	
	
		
			974 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			974 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;
 | |
| }
 | |
| 
 | |
| 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);
 | |
|   }
 | |
| }
 |