mirror of
https://github.com/hay-kot/mealie.git
synced 2025-07-15 01:23:57 -07:00
fix: Restore Webhook Test Functionality (#3857)
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
This commit is contained in:
parent
aa6e109162
commit
6e6ae80c46
7 changed files with 50 additions and 9 deletions
|
@ -6,9 +6,15 @@ const prefix = "/api";
|
|||
const routes = {
|
||||
webhooks: `${prefix}/groups/webhooks`,
|
||||
webhooksId: (id: string | number) => `${prefix}/groups/webhooks/${id}`,
|
||||
webhooksIdTest: (id: string | number) => `${prefix}/groups/webhooks/${id}/test`,
|
||||
};
|
||||
|
||||
export class WebhooksAPI extends BaseCRUDAPI<CreateWebhook, ReadWebhook> {
|
||||
baseRoute = routes.webhooks;
|
||||
itemRoute = routes.webhooksId;
|
||||
itemTestRoute = routes.webhooksIdTest;
|
||||
|
||||
async testOne(itemId: string | number) {
|
||||
return await this.requests.post<null>(`${this.itemTestRoute(itemId)}`, {});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue