mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 15:25:51 +01:00
Merge pull request #48 from TriliumNext/feature/typescript_backend_11
Convert backend to TypeScript (89% -> 92%, final)
This commit is contained in:
@@ -229,7 +229,7 @@ function findNotesByUrl(req: Request){
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
export = {
|
||||
createNote,
|
||||
addClipping,
|
||||
openNote,
|
||||
|
||||
@@ -55,6 +55,6 @@ function exportBranch(req: Request, res: Response) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
export = {
|
||||
exportBranch
|
||||
};
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user