You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
449 B
16 lines
449 B
import type { AlertLog } from "@prisma/client";
|
|
|
|
export function serializeAlert(record: AlertLog) {
|
|
return {
|
|
id: String(record.id),
|
|
alert_type: record.alertType,
|
|
quote_id: record.quoteId,
|
|
cargo_hash: record.cargoHash,
|
|
detail_json: record.detailJson,
|
|
status: record.status,
|
|
resolver_id: record.resolverId,
|
|
resolved_at: record.resolvedAt?.toISOString() ?? null,
|
|
created_at: record.createdAt.toISOString(),
|
|
};
|
|
}
|