1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-21 14:19:41 +02:00
mealie/frontend/api/public/explore.ts

15 lines
420 B
TypeScript
Raw Normal View History

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));
}
}