fix: distinguish missing recovery snapshots
This commit is contained in:
@@ -144,7 +144,7 @@ const recoveryReport = (documentId: string): ProjectRecoveryReport => {
|
||||
const warnings: string[] = []
|
||||
if (!documents[0]) warnings.push('No saved document exists for this ID.')
|
||||
if (integrityValue !== 'ok') warnings.push(`SQLite integrity check returned: ${integrityValue || 'no result'}.`)
|
||||
return { documentId, mode: capabilities.mode, schemaVersion: capabilities.schemaVersion, integrity: integrityValue === 'ok' ? 'ok' : 'failed', lastSavedVersion: documents[0] ? Number(documents[0].version) : null, dirtyAtLastSave: documents[0] ? Boolean(documents[0].dirty) : null, warnings }
|
||||
return { documentId, mode: capabilities.mode, schemaVersion: capabilities.schemaVersion, integrity: !documents[0] ? 'unavailable' : integrityValue === 'ok' ? 'ok' : 'failed', lastSavedVersion: documents[0] ? Number(documents[0].version) : null, dirtyAtLastSave: documents[0] ? Boolean(documents[0].dirty) : null, warnings }
|
||||
}
|
||||
|
||||
const putResource = async (bytes: ArrayBuffer, mediaType: string): Promise<ProjectResource> => {
|
||||
|
||||
Reference in New Issue
Block a user