mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix(server): use iso date string as history query input (#5035)
This commit is contained in:
@@ -119,12 +119,7 @@ export class WorkspacesController {
|
|||||||
const docId = new DocID(guid, ws);
|
const docId = new DocID(guid, ws);
|
||||||
let ts;
|
let ts;
|
||||||
try {
|
try {
|
||||||
const timeNum = parseInt(timestamp);
|
ts = new Date(timestamp);
|
||||||
if (Number.isNaN(timeNum)) {
|
|
||||||
throw new Error('Invalid timestamp');
|
|
||||||
}
|
|
||||||
|
|
||||||
ts = new Date(timeNum);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error('Invalid timestamp');
|
throw new Error('Invalid timestamp');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user