mirror of
https://github.com/zadam/trilium.git
synced 2025-11-18 03:00:41 +01:00
server-ts: Fix errors in abstract_becca_entity
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
export interface Blob {
|
||||
blobId: string;
|
||||
content: Buffer;
|
||||
content: string | Buffer;
|
||||
utcDateModified: string;
|
||||
}
|
||||
@@ -6,7 +6,7 @@ export interface EntityChange {
|
||||
entity?: any;
|
||||
positions?: Record<string, string>;
|
||||
hash: string;
|
||||
utcDateChanged: string;
|
||||
utcDateChanged?: string;
|
||||
isSynced: boolean | 1 | 0;
|
||||
isErased: boolean | 1 | 0;
|
||||
componentId?: string | null;
|
||||
|
||||
@@ -24,7 +24,7 @@ function md5(content: crypto.BinaryLike) {
|
||||
return crypto.createHash('md5').update(content).digest('hex');
|
||||
}
|
||||
|
||||
function hashedBlobId(content: string) {
|
||||
function hashedBlobId(content: string | Buffer) {
|
||||
if (content === null || content === undefined) {
|
||||
content = "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user