Change origin format in put()
This commit is contained in:
1 parent
df3039a04b
commit
e620db5c7b
1 file changed
+2
-1
+2
-1
@@ -1,6 +1,7 @@
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { state } from '../db-admin/health-legacy';
|
||||
import { getParentId } from '../lib/docuri';
|
||||
import { dbUrlToUserId } from '../lib/user-id';
|
||||
|
||||
declare global {
|
||||
var localDb: any;
|
||||
@@ -35,7 +36,7 @@ export const put = async (
|
||||
_rev: current._rev,
|
||||
type,
|
||||
to: current.to,
|
||||
origin: current.origin ?? state().remoteUrl,
|
||||
origin: current.origin ?? dbUrlToUserId(state().remoteUrl),
|
||||
doc: update(current.doc),
|
||||
};
|
||||
await targetDb.put(putDoc);
|
||||
|
||||
Reference in new issue
Block a user