mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-30 17:53:31 -04:00 
			
		
		
		
	* update types * remove toolbox routes * remove unused "" * add generic crud table * update calls for type safety * recreate food/unit editors * fix type error * remove shopping list link * add transition * add basic search box * conditional show-select * styling + basic download support * generic download as json function * add fraction support * add export option * add label text
		
			
				
	
	
		
			15 lines
		
	
	
		
			400 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			400 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { BaseCRUDAPI } from "../_base";
 | |
| import { CreateIngredientUnit, IngredientUnit } from "~/types/api-types/recipe";
 | |
| 
 | |
| const prefix = "/api";
 | |
| 
 | |
| const routes = {
 | |
|   unit: `${prefix}/units`,
 | |
|   unitsUnit: (tag: string) => `${prefix}/units/${tag}`,
 | |
| };
 | |
| 
 | |
| export class UnitAPI extends BaseCRUDAPI<IngredientUnit, CreateIngredientUnit> {
 | |
|   baseRoute: string = routes.unit;
 | |
|   itemRoute = routes.unitsUnit;
 | |
| }
 |