mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-19 21:29:40 +02:00
15 lines
371 B
TypeScript
15 lines
371 B
TypeScript
|
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));
|
||
|
}
|
||
|
}
|