mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 15:49:42 +02: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
14 lines
420 B
TypeScript
14 lines
420 B
TypeScript
import { BaseAPI } from "../_base";
|
|
import { Recipe } from "~/types/api-types/recipe";
|
|
|
|
const prefix = "/api";
|
|
|
|
const routes = {
|
|
recipe: (groupId: string, recipeSlug: string) => `${prefix}/explore/recipes/${groupId}/${recipeSlug}`,
|
|
};
|
|
|
|
export class ExploreApi extends BaseAPI {
|
|
async recipe(groupId: string, recipeSlug: string) {
|
|
return await this.requests.get<Recipe>(routes.recipe(groupId, recipeSlug));
|
|
}
|
|
}
|