Files
NextChair/src/services/notifications/providers/console-push-provider.ts
T
2026-09-05 09:32:05 +01:00

20 lines
873 B
TypeScript

import type { PushProvider, PushSendResult, SendPushParams } from "./push-provider";
/** Dev-only — see console-email-provider.ts for the same pattern and reasoning. */
export class ConsolePushProvider implements PushProvider {
readonly name = "console";
async sendPush(params: SendPushParams): Promise<PushSendResult> {
console.log(
[
"──── [ConsolePushProvider] would send a push (not actually sent) ────",
`Endpoint: ${params.subscription.endpoint.slice(0, 60)}...`,
`Title: ${params.title}`,
`Body: ${params.body}`,
"────────────────────────────────────────────────────────────────────",
].join("\n"),
);
return { status: "sent" };
}
}