mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 10:13:32 -04:00 
			
		
		
		
	Consolidate frontend types (#1245)
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							6a88a59981
						
					
				
				
					commit
					479900e912
				
			| @@ -1,8 +1,5 @@ | ||||
| import { BaseAPI } from "../_base"; | ||||
|  | ||||
| export type Validation = { | ||||
|   valid: boolean; | ||||
| }; | ||||
| import { ValidationResponse } from "~/types/api-types/response"; | ||||
|  | ||||
| const prefix = "/api"; | ||||
|  | ||||
| @@ -15,18 +12,18 @@ const routes = { | ||||
|  | ||||
| export class ValidatorsApi extends BaseAPI { | ||||
|   async group(name: string) { | ||||
|     return await this.requests.get<Validation>(routes.group(name)); | ||||
|     return await this.requests.get<ValidationResponse>(routes.group(name)); | ||||
|   } | ||||
|  | ||||
|   async username(name: string) { | ||||
|     return await this.requests.get<Validation>(routes.user(name)); | ||||
|     return await this.requests.get<ValidationResponse>(routes.user(name)); | ||||
|   } | ||||
|  | ||||
|   async email(email: string) { | ||||
|     return await this.requests.get<Validation>(routes.email(email)); | ||||
|     return await this.requests.get<ValidationResponse>(routes.email(email)); | ||||
|   } | ||||
|  | ||||
|   async recipe(groupId: string, name: string) { | ||||
|     return await this.requests.get<Validation>(routes.recipe(groupId, name)); | ||||
|     return await this.requests.get<ValidationResponse>(routes.recipe(groupId, name)); | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user