mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-11-03 19:18:22 -05:00 
			
		
		
		
	* initial public explorer API endpoint * public API endpoint * cleanup recipe page * wip: init explorer page * use public URLs for shared recipes * refactor private share tokens to use shared page
		
			
				
	
	
		
			15 lines
		
	
	
		
			371 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			371 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { BaseAPI } from "../_base";
 | 
						|
import { Recipe } from "~/types/api-types/recipe";
 | 
						|
 | 
						|
const prefix = "/api";
 | 
						|
 | 
						|
const routes = {
 | 
						|
  recipeShareToken: (token: string) => `${prefix}/recipes/shared/${token}`,
 | 
						|
};
 | 
						|
 | 
						|
export class SharedApi extends BaseAPI {
 | 
						|
  async getShared(item_id: string) {
 | 
						|
    return await this.requests.get<Recipe>(routes.recipeShareToken(item_id));
 | 
						|
  }
 | 
						|
}
 |