mirror of
https://github.com/Myzel394/kleckrelay-website.git
synced 2025-06-20 08:15:26 +02:00
26 lines
559 B
TypeScript
26 lines
559 B
TypeScript
import {DecryptedReportContent} from "~/server-types"
|
|
|
|
export default function parseDecryptedReport(
|
|
report: any,
|
|
): DecryptedReportContent {
|
|
return {
|
|
...report,
|
|
messageDetails: {
|
|
...report.messageDetails,
|
|
meta: {
|
|
...report.messageDetails.meta,
|
|
createdAt: new Date(report.messageDetails.meta.createdAt),
|
|
},
|
|
content: {
|
|
...report.messageDetails.content,
|
|
proxiedImages: report.messageDetails.content.proxiedImages.map(
|
|
image => ({
|
|
...image,
|
|
createdAt: new Date(image.createdAt),
|
|
}),
|
|
),
|
|
},
|
|
},
|
|
}
|
|
}
|