Replacing URLs by user ids in origins
This commit is contained in:
1 parent
f07bf07c3f
commit
c8644c8817
3 files changed
+92
-43
No files matched your search
+4
-3
@@ -7,6 +7,7 @@ import { state } from '../db-admin/health-legacy';
|
||||
import { lat2tile, lon2tile, rectanglesIntersect } from '../lib/geo';
|
||||
import { findStartTime } from '../lib/gpx';
|
||||
import getUri, { intToGpxId, intToTrkptId } from '../lib/ids';
|
||||
import { dbUrlToUserId } from '../lib/user-id';
|
||||
import { get, getDocsByType, getFamily, put, putAll } from './lib';
|
||||
|
||||
export const emptyGpx: Gpx = {
|
||||
@@ -127,7 +128,7 @@ const prune = (
|
||||
_id: getUri(key, subId),
|
||||
type: key,
|
||||
to,
|
||||
origin: state().remoteUrl,
|
||||
origin: dbUrlToUserId(state().remoteUrl),
|
||||
doc: subObjects[index],
|
||||
});
|
||||
prune(subId, subObjects[index], previousIds, {}, docs, to);
|
||||
@@ -202,14 +203,14 @@ export const pruneAndSaveImportedGpx = async (params: any) => {
|
||||
{
|
||||
_id: getUri('gpx', gpxId),
|
||||
type: 'gpx',
|
||||
origin: state().remoteUrl,
|
||||
origin: dbUrlToUserId(state().remoteUrl),
|
||||
doc: gpx,
|
||||
// a new GPX isn't to...
|
||||
},
|
||||
{
|
||||
_id: getUri('extensions', gpxId),
|
||||
type: 'extensions',
|
||||
origin: state().remoteUrl,
|
||||
origin: dbUrlToUserId(state().remoteUrl),
|
||||
doc: {},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user