mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-15 16:32:40 -05:00
fix: Refactor Recipe Zip File Flow (#6170)
This commit is contained in:
@@ -6,9 +6,14 @@ 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