server-ts: Port routes/routes

This commit is contained in:
Elian Doran
2024-04-11 23:00:24 +03:00
parent 4638351ec8
commit dededcd303
7 changed files with 100 additions and 92 deletions

View File

@@ -124,7 +124,7 @@ function attachmentContentProvider(req: Request) {
return streamContent(attachment.getContent(), attachment.getFileName(), attachment.mime);
}
function streamContent(content: string | Buffer, fileName: string, mimeType: string) {
async function streamContent(content: string | Buffer, fileName: string, mimeType: string) {
if (typeof content === "string") {
content = Buffer.from(content, 'utf8');
}