mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-30 17:53:31 -04:00 
			
		
		
		
	Consolidate frontend types (#1245)
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							6a88a59981
						
					
				
				
					commit
					479900e912
				
			| @@ -1,4 +1,5 @@ | ||||
| import { BaseCRUDAPI } from "../_base"; | ||||
| import { CreateWebhook, ReadWebhook } from "~/types/api-types/group"; | ||||
|  | ||||
| const prefix = "/api"; | ||||
|  | ||||
| @@ -7,19 +8,7 @@ const routes = { | ||||
|   webhooksId: (id: string | number) => `${prefix}/groups/webhooks/${id}`, | ||||
| }; | ||||
|  | ||||
| export interface CreateGroupWebhook { | ||||
|   enabled: boolean; | ||||
|   name: string; | ||||
|   url: string; | ||||
|   time: string; | ||||
| } | ||||
|  | ||||
| export interface GroupWebhook extends CreateGroupWebhook { | ||||
|   id: string; | ||||
|   groupId: string; | ||||
| } | ||||
|  | ||||
| export class WebhooksAPI extends BaseCRUDAPI<GroupWebhook, CreateGroupWebhook> { | ||||
| export class WebhooksAPI extends BaseCRUDAPI<CreateWebhook, ReadWebhook> { | ||||
|   baseRoute = routes.webhooks; | ||||
|   itemRoute = routes.webhooksId; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user