mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-21 05:08:51 +00:00
parent
bbd4445aa3
commit
85ec9e9bfb
1 changed files with 18 additions and 0 deletions
|
|
@ -95,6 +95,24 @@ api.addWebhook = {
|
|||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* @api {get} /api/v3/user/webhook Get webhooks - BETA
|
||||
* @apiName UserGetWebhook
|
||||
* @apiGroup Webhook
|
||||
*
|
||||
* @apiSuccess {Array} data User's webhooks
|
||||
*/
|
||||
api.getWebhook = {
|
||||
method: 'GET',
|
||||
middlewares: [authWithHeaders()],
|
||||
url: '/user/webhook',
|
||||
async handler (req, res) {
|
||||
let user = res.locals.user;
|
||||
|
||||
res.respond(200, user.webhooks);
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* @api {put} /api/v3/user/webhook/:id Edit a webhook - BETA
|
||||
* @apiName UserUpdateWebhook
|
||||
|
|
|
|||
Loading…
Reference in a new issue