mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-30 17:53:31 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			703 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			703 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { BaseCRUDAPI } from "../base/base-clients";
 | |
| import { GroupEventNotifierCreate, GroupEventNotifierOut, GroupEventNotifierUpdate } from "~/lib/api/types/household";
 | |
| 
 | |
| const prefix = "/api";
 | |
| 
 | |
| const routes = {
 | |
|   eventNotifier: `${prefix}/households/events/notifications`,
 | |
|   eventNotifierId: (id: string | number) => `${prefix}/households/events/notifications/${id}`,
 | |
| };
 | |
| 
 | |
| export class GroupEventNotifierApi extends BaseCRUDAPI<
 | |
|   GroupEventNotifierCreate,
 | |
|   GroupEventNotifierOut,
 | |
|   GroupEventNotifierUpdate
 | |
| > {
 | |
|   baseRoute = routes.eventNotifier;
 | |
|   itemRoute = routes.eventNotifierId;
 | |
| 
 | |
|   async test(itemId: string) {
 | |
|     return await this.requests.post(`${this.baseRoute}/${itemId}/test`, {});
 | |
|   }
 | |
| }
 |