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

15 lines
371 B
TypeScript
Raw Normal View History

import { BaseAPI } from "../_base";
import { Recipe } from "~/types/api-types/recipe";
const prefix = "/api";
const routes = {
recipeShareToken: (token: string) => `${prefix}/recipes/shared/${token}`,
};
export class SharedApi extends BaseAPI {
async getShared(item_id: string) {
return await this.requests.get<Recipe>(routes.recipeShareToken(item_id));
}
}