mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 18:23:18 -04:00 
			
		
		
		
	* feat: add api endpoints for volume check * feat: add docker icon * add size prop * feat: add frontend UI for checking docker-volume * update caddy to server validation file * add more extensive documentation around setup req * fix: wrong type on user id #1123 * spelling * refactor: cleanup excessive function calls
		
			
				
	
	
		
			35 lines
		
	
	
		
			938 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			938 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { BaseAPI } from "../_base";
 | |
| import { AdminAboutInfo, DockerVolumeText, CheckAppConfig } from "~/types/api-types/admin";
 | |
| 
 | |
| const prefix = "/api";
 | |
| 
 | |
| const routes = {
 | |
|   about: `${prefix}/admin/about`,
 | |
|   aboutStatistics: `${prefix}/admin/about/statistics`,
 | |
|   check: `${prefix}/admin/about/check`,
 | |
|   docker: `${prefix}/admin/about/docker/validate`,
 | |
|   validationFile: `${prefix}/media/docker/validate.txt`,
 | |
| };
 | |
| 
 | |
| 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);
 | |
|   }
 | |
| 
 | |
|   async checkDocker() {
 | |
|     return await this.requests.get<DockerVolumeText>(routes.docker);
 | |
|   }
 | |
| 
 | |
|   async getDockerValidateFileContents() {
 | |
|     return await this.requests.get<string>(routes.validationFile);
 | |
|   }
 | |
| }
 |