Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/core-webhooks/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ export const startServer = async config => {
path: "/api/webhooks",
handler: () => {
return {
data: database.all(),
data: database.all().map(webhook => {
webhook = { ...webhook };
delete webhook.token;
return webhook;
}),
};
},
});
Expand Down Expand Up @@ -68,7 +72,7 @@ export const startServer = async config => {
return Boom.notFound();
}

const webhook: IWebhook = database.findById(request.params.id);
const webhook: IWebhook = { ...database.findById(request.params.id) };
delete webhook.token;

return utils.respondWithResource(webhook);
Expand Down