mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-30 01:34:39 -04:00 
			
		
		
		
	* cleanup oversized buttons * add get all by category function to reciep repos * fix shopping-list can_merge logic * use randomized data for testing * add random getter to repository for meal-planner * add stub route for random meals * cleanup global namespace * add rules database type * fix type * add plan rules schema * test plan rules methods * add mealplan rules controller * add new repository * update frontend types * formatting * fix regression * update autogenerated types * add api class for mealplan rules * add tests and fix bugs * fix data returns * proof of concept rules editor * add tag support * remove old group categories * add tag support * implement random by rules api * change snack to sides * remove incorrect typing * split repo for custom methods * fix query and use and_ clause * use repo function * remove old test * update changelog
		
			
				
	
	
		
			15 lines
		
	
	
		
			425 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			425 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { BaseCRUDAPI } from "../_base";
 | |
| import { PlanRulesCreate, PlanRulesOut } from "~/types/api-types/meal-plan";
 | |
| 
 | |
| const prefix = "/api";
 | |
| 
 | |
| const routes = {
 | |
|   rule: `${prefix}/groups/mealplans/rules`,
 | |
|   ruleId: (id: string | number) => `${prefix}/groups/mealplans/rules/${id}`,
 | |
| };
 | |
| 
 | |
| export class MealPlanRulesApi extends BaseCRUDAPI<PlanRulesOut, PlanRulesCreate> {
 | |
|   baseRoute = routes.rule;
 | |
|   itemRoute = routes.ruleId;
 | |
| }
 |