mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-04 21:15:22 +02:00
feat: public recipe access (#1610)
* 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
This commit is contained in:
parent
9ea5e6584f
commit
18b2c92a76
24 changed files with 361 additions and 437 deletions
14
frontend/api/public/explore.ts
Normal file
14
frontend/api/public/explore.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
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));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue