Refactoring the worker / db init flow.

This commit is contained in:
vdv committed 2023-02-13 15:44:02 +01:00
1 parent cfaf7ad72f
commit 6dfe98b655
5 files changed
+57 -48

No files matched your search

+10 -6
View File
@@ -439,12 +439,16 @@ export const putGpx = async (params: any) => {
await put(id, 'gpx', (doc) => gpx, gpx);
if (extensions !== undefined) {
await put(
`${id}/4extensions`,
'extensions',
(doc) => extensions,
extensions
);
try {
await put(
`${id}/4extensions`,
'extensions',
(doc) => extensions,
extensions
);
} catch (error) {
console.error({ caller: 'putGpx / extensions', error });
}
}
if (previousShared !== extensions?.shared) {
+2
View File
@@ -99,5 +99,7 @@ export const initDb = async () => {
globalThis.dbReady = true;
watchDbLegacy();
console.log({ caller: 'initDb / done' });
return;
}
};