summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorTomatoCake <60300461+DEVTomatoCake@users.noreply.github.com>2024-07-18 15:36:00 +0200
committerTomatoCake <60300461+DEVTomatoCake@users.noreply.github.com>2024-07-18 15:36:00 +0200
commit4b1e9ba851a38cd36f6c5b362b51ecf39bad6ef2 (patch)
tree10306d4cfcd0d55ef472f5202d98bfade4f38f5c /src/api
parentConsistent relations, url property, src channel (diff)
downloadserver-ts-4b1e9ba851a38cd36f6c5b362b51ecf39bad6ef2.tar.xz
Prettier
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/channels/#channel_id/webhooks.ts15
-rw-r--r--src/api/routes/guilds/#guild_id/webhooks.ts15
-rw-r--r--src/api/routes/webhooks/#webhook_id/index.ts3
3 files changed, 24 insertions, 9 deletions
diff --git a/src/api/routes/channels/#channel_id/webhooks.ts b/src/api/routes/channels/#channel_id/webhooks.ts

index 7533fcebb..2060760d5 100644 --- a/src/api/routes/channels/#channel_id/webhooks.ts +++ b/src/api/routes/channels/#channel_id/webhooks.ts
@@ -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, + })), + ); }, ); diff --git a/src/api/routes/guilds/#guild_id/webhooks.ts b/src/api/routes/guilds/#guild_id/webhooks.ts
index 60c9818ab..47e199475 100644 --- a/src/api/routes/guilds/#guild_id/webhooks.ts +++ b/src/api/routes/guilds/#guild_id/webhooks.ts
@@ -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, + })), + ); }, ); diff --git a/src/api/routes/webhooks/#webhook_id/index.ts b/src/api/routes/webhooks/#webhook_id/index.ts
index c10bf2247..59fdb76df 100644 --- a/src/api/routes/webhooks/#webhook_id/index.ts +++ b/src/api/routes/webhooks/#webhook_id/index.ts
@@ -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",