Merge pull request #48 from TriliumNext/feature/typescript_backend_11

Convert backend to TypeScript (89% -> 92%, final)
This commit is contained in:
Elian Doran
2024-04-20 09:37:19 +03:00
committed by GitHub
12 changed files with 216 additions and 137 deletions

View File

@@ -229,7 +229,7 @@ function findNotesByUrl(req: Request){
}
}
module.exports = {
export = {
createNote,
addClipping,
openNote,

View File

@@ -55,6 +55,6 @@ function exportBranch(req: Request, res: Response) {
}
}
module.exports = {
export = {
exportBranch
};

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');
}