mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 04:32:35 +01:00
Prettier
This commit is contained in:
parent
adc3474216
commit
4b1e9ba851
@ -63,10 +63,17 @@ router.get(
|
|||||||
|
|
||||||
const instanceUrl =
|
const instanceUrl =
|
||||||
Config.get().api.endpointPublic || "http://localhost:3001";
|
Config.get().api.endpointPublic || "http://localhost:3001";
|
||||||
return res.json(webhooks.map(webhook => ({
|
return res.json(
|
||||||
...webhook,
|
webhooks.map((webhook) => ({
|
||||||
url: instanceUrl + "/webhooks/" + webhook.id + "/" + webhook.token,
|
...webhook,
|
||||||
})));
|
url:
|
||||||
|
instanceUrl +
|
||||||
|
"/webhooks/" +
|
||||||
|
webhook.id +
|
||||||
|
"/" +
|
||||||
|
webhook.token,
|
||||||
|
})),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -49,10 +49,17 @@ router.get(
|
|||||||
|
|
||||||
const instanceUrl =
|
const instanceUrl =
|
||||||
Config.get().api.endpointPublic || "http://localhost:3001";
|
Config.get().api.endpointPublic || "http://localhost:3001";
|
||||||
return res.json(webhooks.map(webhook => ({
|
return res.json(
|
||||||
...webhook,
|
webhooks.map((webhook) => ({
|
||||||
url: instanceUrl + "/webhooks/" + webhook.id + "/" + webhook.token,
|
...webhook,
|
||||||
})));
|
url:
|
||||||
|
instanceUrl +
|
||||||
|
"/webhooks/" +
|
||||||
|
webhook.id +
|
||||||
|
"/" +
|
||||||
|
webhook.token,
|
||||||
|
})),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -11,7 +11,8 @@ const router = Router();
|
|||||||
router.get(
|
router.get(
|
||||||
"/",
|
"/",
|
||||||
route({
|
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: {
|
responses: {
|
||||||
200: {
|
200: {
|
||||||
body: "APIWebhook",
|
body: "APIWebhook",
|
||||||
|
Loading…
Reference in New Issue
Block a user