|
@@ -21,7 +21,7 @@ import {
|
|
|
deleteUserCollection,
|
|
|
deleteUserRequest,
|
|
|
editGQLUserRequest,
|
|
|
- renameUserCollection,
|
|
|
+ updateUserCollection,
|
|
|
} from "./collections.api"
|
|
|
|
|
|
import * as E from "fp-ts/Either"
|
|
@@ -158,8 +158,13 @@ export const storeSyncDefinition: StoreSyncDefinitionOf<
|
|
|
[collectionIndex]
|
|
|
)?.id
|
|
|
|
|
|
- if (collectionID && collection.name) {
|
|
|
- renameUserCollection(collectionID, collection.name)
|
|
|
+ const data = {
|
|
|
+ auth: collection.auth,
|
|
|
+ headers: collection.headers,
|
|
|
+ }
|
|
|
+
|
|
|
+ if (collectionID) {
|
|
|
+ updateUserCollection(collectionID, collection.name, JSON.stringify(data))
|
|
|
}
|
|
|
},
|
|
|
async addFolder({ name, path }) {
|
|
@@ -197,8 +202,13 @@ export const storeSyncDefinition: StoreSyncDefinitionOf<
|
|
|
path.split("/").map((index) => parseInt(index))
|
|
|
)?.id
|
|
|
|
|
|
- if (folderBackendId && folder.name) {
|
|
|
- renameUserCollection(folderBackendId, folder.name)
|
|
|
+ const data = {
|
|
|
+ auth: folder.auth,
|
|
|
+ headers: folder.headers,
|
|
|
+ }
|
|
|
+
|
|
|
+ if (folderBackendId) {
|
|
|
+ updateUserCollection(folderBackendId, folder.name, JSON.stringify(data))
|
|
|
}
|
|
|
},
|
|
|
async removeFolder({ folderID }) {
|