mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
321b232f17
* Move 'Webhook' settings to table * Add tests
20 lines
553 B
TypeScript
20 lines
553 B
TypeScript
import type { WebhookSubscription } from "@server/models";
|
|
import presentUser from "@server/presenters/user";
|
|
|
|
export default function presentWebhookSubscription(
|
|
webhook: WebhookSubscription
|
|
) {
|
|
return {
|
|
id: webhook.id,
|
|
name: webhook.name,
|
|
url: webhook.url,
|
|
secret: webhook.secret,
|
|
events: webhook.events,
|
|
enabled: webhook.enabled,
|
|
createdBy: webhook.createdBy ? presentUser(webhook.createdBy) : undefined,
|
|
createdById: webhook.createdById,
|
|
createdAt: webhook.createdAt,
|
|
updatedAt: webhook.updatedAt,
|
|
};
|
|
}
|