@overmap-ai/core 1.0.46-project-attachments.0 → 1.0.46-project-attachments.2
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.
package/dist/overmap-core.js
CHANGED
|
@@ -7289,9 +7289,10 @@ class LicenseService extends BaseApiService {
|
|
|
7289
7289
|
}
|
|
7290
7290
|
class DocumentService extends BaseApiService {
|
|
7291
7291
|
add(document2) {
|
|
7292
|
-
const offlineDocument = offline(document2);
|
|
7293
7292
|
const { store } = this.client;
|
|
7293
|
+
const currentUserId = store.getState().userReducer.currentUser.id;
|
|
7294
7294
|
const activeProjectId = store.getState().projectReducer.activeProjectId;
|
|
7295
|
+
const offlineDocument = offline({ ...document2, created_by: currentUserId });
|
|
7295
7296
|
store.dispatch(addDocuments([offlineDocument]));
|
|
7296
7297
|
const promise = this.enqueueRequest({
|
|
7297
7298
|
description: "Create Document",
|
|
@@ -7318,7 +7319,7 @@ class DocumentService extends BaseApiService {
|
|
|
7318
7319
|
store.dispatch(updateDocuments([documentToBeUpdated]));
|
|
7319
7320
|
const promise = this.enqueueRequest({
|
|
7320
7321
|
description: "Delete Document",
|
|
7321
|
-
method: HttpMethod.
|
|
7322
|
+
method: HttpMethod.PATCH,
|
|
7322
7323
|
url: `/documents/${document2.offline_id}`,
|
|
7323
7324
|
blockers: [document2.offline_id],
|
|
7324
7325
|
blocks: [document2.offline_id]
|