refactor promisedRequest to always return whole response

This commit is contained in:
Henry Jameson 2026-06-17 17:58:14 +03:00
commit 1ca0ffb1f0
25 changed files with 352 additions and 327 deletions

View file

@ -31,10 +31,7 @@ export const useBookmarkFoldersStore = defineStore('bookmarkFolders', {
this.fetcher = fetchBookmarkFolders({
credentials: useOAuthStore().token,
})
.then(
(folders) => this.setBookmarkFolders(folders),
(rej) => console.error(rej),
)
.then(({ data: folders }) => this.setBookmarkFolders(folders))
.catch((e) => {
console.error(e)
})
@ -61,7 +58,7 @@ export const useBookmarkFoldersStore = defineStore('bookmarkFolders', {
name,
emoji,
credentials: useOAuthStore().token,
}).then((folder) => {
}).then(({ data: folder }) => {
this.setBookmarkFolder(folder)
return folder
})
@ -72,7 +69,7 @@ export const useBookmarkFoldersStore = defineStore('bookmarkFolders', {
folderId,
name,
emoji,
}).then((folder) => {
}).then(({ data: folder }) => {
this.setBookmarkFolder(folder)
return folder
})