@overmap-ai/core 1.0.60-geo-images.3 → 1.0.60-geo-images.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7178,11 +7178,12 @@ class UserService extends BaseApiService {
7178
7178
  }
7179
7179
  }
7180
7180
  class GeoImageService extends BaseUploadService {
7181
- async add(payload, file) {
7181
+ async add(payload) {
7182
7182
  const { store } = this.client;
7183
+ const { file, ...payloadWithoutFile } = payload;
7183
7184
  const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
7184
7185
  const currentUser = store.getState().userReducer.currentUser;
7185
- const projectId = payload.project;
7186
+ const projectId = payloadWithoutFile.project;
7186
7187
  const sha1 = await hashFile(file);
7187
7188
  const filePayload = {
7188
7189
  sha1,
@@ -7191,7 +7192,7 @@ class GeoImageService extends BaseUploadService {
7191
7192
  size: file.size
7192
7193
  };
7193
7194
  const offlineMapImage = offline({
7194
- ...payload,
7195
+ ...payloadWithoutFile,
7195
7196
  file_name: file.name,
7196
7197
  file_sha1: sha1,
7197
7198
  file: URL.createObjectURL(file),
@@ -7228,7 +7229,7 @@ class GeoImageService extends BaseUploadService {
7228
7229
  });
7229
7230
  return [offlineMapImage, promise.then((result) => result.geo_image)];
7230
7231
  }
7231
- async bulkAdd(payloadAndFiles, projectId) {
7232
+ async bulkAdd(payloads, projectId) {
7232
7233
  const { store } = this.client;
7233
7234
  const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
7234
7235
  const currentUser = store.getState().userReducer.currentUser;
@@ -7236,8 +7237,8 @@ class GeoImageService extends BaseUploadService {
7236
7237
  const offlineIds = [];
7237
7238
  const geoImagePayloads = [];
7238
7239
  const filePayloadRecord = {};
7239
- for (const payloadAndFile of payloadAndFiles) {
7240
- const { payload, file } = payloadAndFile;
7240
+ for (const payloadAndFile of payloads) {
7241
+ const { file, ...payload } = payloadAndFile;
7241
7242
  const sha1 = await hashFile(file);
7242
7243
  if (!(sha1 in filePayloadRecord)) {
7243
7244
  filePayloadRecord[sha1] = {