mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 02:03:35 -04:00 
			
		
		
		
	
		
			
	
	
		
			19 lines
		
	
	
		
			900 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			19 lines
		
	
	
		
			900 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
|  | // This Content is Auto Generated | ||
|  | import { API_ROUTES } from "./apiRoutes" | ||
|  | 
 | ||
|  | export const {{paths.export_name}}API = { {% for path in paths.all_paths  %} {% for verb in path.http_verbs  %} {% if path.route_object.is_function %} | ||
|  |   /** {{ verb.js_docs }} {% for v in path.route_object.var %} | ||
|  |    * @param {{ v }} {% endfor %} | ||
|  |    */ | ||
|  |   {{ verb.summary_camel }}({{path.route_object.var|join(", ")}}) { | ||
|  |     const response = await apiReq.{{ verb.request_type.value }}(API_ROUTES.{{ path.route_object.router_camel }}({{path.route_object.var|join(", ")}})) | ||
|  |     return response.data | ||
|  |   }, {% else %} | ||
|  |   /** {{ verb.js_docs }} {% for v in path.route_object.var %} | ||
|  |    * @param {{ v }} {% endfor %} | ||
|  |    */ | ||
|  |   {{ verb.summary_camel }}() { | ||
|  |     const response = await apiReq.{{ verb.request_type.value }}(API_ROUTES.{{ path.route_object.router_camel }}) | ||
|  |     return response.data | ||
|  |   },{% endif %} {% endfor %} {% endfor %} | ||
|  | } |