@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.
@@ -7279,9 +7279,10 @@ var __publicField = (obj, key, value) => {
7279
7279
  }
7280
7280
  class DocumentService extends BaseApiService {
7281
7281
  add(document2) {
7282
- const offlineDocument = offline(document2);
7283
7282
  const { store } = this.client;
7283
+ const currentUserId = store.getState().userReducer.currentUser.id;
7284
7284
  const activeProjectId = store.getState().projectReducer.activeProjectId;
7285
+ const offlineDocument = offline({ ...document2, created_by: currentUserId });
7285
7286
  store.dispatch(addDocuments([offlineDocument]));
7286
7287
  const promise = this.enqueueRequest({
7287
7288
  description: "Create Document",
@@ -7308,7 +7309,7 @@ var __publicField = (obj, key, value) => {
7308
7309
  store.dispatch(updateDocuments([documentToBeUpdated]));
7309
7310
  const promise = this.enqueueRequest({
7310
7311
  description: "Delete Document",
7311
- method: HttpMethod.DELETE,
7312
+ method: HttpMethod.PATCH,
7312
7313
  url: `/documents/${document2.offline_id}`,
7313
7314
  blockers: [document2.offline_id],
7314
7315
  blocks: [document2.offline_id]