mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-04-11 23:45:36 -04:00
chore: Nuxt 4 upgrade (#7426)
This commit is contained in:
19
frontend/app/lib/api/user/recipes/recipe-share.ts
Normal file
19
frontend/app/lib/api/user/recipes/recipe-share.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { BaseCRUDAPI } from "../../base/base-clients";
|
||||
import type { RecipeShareToken, RecipeShareTokenCreate } from "~/lib/api/types/recipe";
|
||||
|
||||
const prefix = "/api";
|
||||
|
||||
const routes = {
|
||||
shareToken: `${prefix}/shared/recipes`,
|
||||
shareTokenId: (id: string) => `${prefix}/shared/recipes/${id}`,
|
||||
shareTokenIdZip: (id: string) => `${prefix}/recipes/shared/${id}/zip`,
|
||||
};
|
||||
|
||||
export class RecipeShareApi extends BaseCRUDAPI<RecipeShareTokenCreate, RecipeShareToken> {
|
||||
baseRoute: string = routes.shareToken;
|
||||
itemRoute = routes.shareTokenId;
|
||||
|
||||
getZipRedirectUrl(tokenId: string) {
|
||||
return routes.shareTokenIdZip(tokenId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user