mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-05-31 20:25:14 -04:00
* added support for group slugs * modified frontend to use links with group slug * fixed test refs * unused import --------- Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
15 lines
438 B
TypeScript
15 lines
438 B
TypeScript
import { BaseAPI } from "../base/base-clients";
|
|
import { Recipe } from "~/lib/api/types/recipe";
|
|
|
|
const prefix = "/api";
|
|
|
|
const routes = {
|
|
recipe: (groupSlug: string, recipeSlug: string) => `${prefix}/explore/recipes/${groupSlug}/${recipeSlug}`,
|
|
};
|
|
|
|
export class ExploreApi extends BaseAPI {
|
|
async recipe(groupSlug: string, recipeSlug: string) {
|
|
return await this.requests.get<Recipe>(routes.recipe(groupSlug, recipeSlug));
|
|
}
|
|
}
|