Skip to content

Documentation


Documentation / @kizami/db / markNotificationRead

Function: markNotificationRead()

markNotificationRead(db, params): Promise<{ body: string; createdAt: number; id: string; readAt: number | null; subjectDate: string | null; tenantId: string; title: string; type: string; userId: string; } | null>

Defined in: packages/db/src/queries/notifications.ts:130

指定の通知を既読にする((tenantId, userId) にスコープした条件付き UPDATE)。 存在しない・他人のものならどちらも 0 件更新となり null を返す。

Parameters

db

Database

params

MarkNotificationReadParams

Returns

Promise<{ body: string; createdAt: number; id: string; readAt: number | null; subjectDate: string | null; tenantId: string; title: string; type: string; userId: string; } | null>