Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
DEVTomatoCake committed Jul 18, 2024
1 parent adc3474 commit 4b1e9ba
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
15 changes: 11 additions & 4 deletions src/api/routes/channels/#channel_id/webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,17 @@ router.get(

const instanceUrl =
Config.get().api.endpointPublic || "http://localhost:3001";
return res.json(webhooks.map(webhook => ({
...webhook,
url: instanceUrl + "/webhooks/" + webhook.id + "/" + webhook.token,
})));
return res.json(
webhooks.map((webhook) => ({
...webhook,
url:
instanceUrl +
"/webhooks/" +
webhook.id +
"/" +
webhook.token,
})),
);
},
);

Expand Down
15 changes: 11 additions & 4 deletions src/api/routes/guilds/#guild_id/webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,17 @@ router.get(

const instanceUrl =
Config.get().api.endpointPublic || "http://localhost:3001";
return res.json(webhooks.map(webhook => ({
...webhook,
url: instanceUrl + "/webhooks/" + webhook.id + "/" + webhook.token,
})));
return res.json(
webhooks.map((webhook) => ({
...webhook,
url:
instanceUrl +
"/webhooks/" +
webhook.id +
"/" +
webhook.token,
})),
);
},
);

Expand Down
3 changes: 2 additions & 1 deletion src/api/routes/webhooks/#webhook_id/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const router = Router();
router.get(
"/",
route({
description: "Returns a webhook object for the given id. Requires the MANAGE_WEBHOOKS permission or to be the owner of the webhook.",
description:
"Returns a webhook object for the given id. Requires the MANAGE_WEBHOOKS permission or to be the owner of the webhook.",
responses: {
200: {
body: "APIWebhook",
Expand Down

0 comments on commit 4b1e9ba

Please sign in to comment.