Skip to content

Commit 0848399

Browse files
authored
[HOTFIX] fix(api): Sync playlist both ways by sending two requests (#75)
1 parent 63b12f3 commit 0848399

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

frontend/src/composables/useSync.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ export const runSync = defineMutation(() => {
66
const toast = useToast();
77
const mutation = useMutation({
88
mutation: async (playlist_sync_id: number) => {
9-
const res = await client.POST("/api/playlists-sync/{playlist_sync_id}", {
9+
const res1 = await client.POST("/api/playlists-sync/{playlist_sync_id}", {
10+
params: { path: { playlist_sync_id }, query: { inverse: false } },
11+
});
12+
const res2 = await client.POST("/api/playlists-sync/{playlist_sync_id}", {
1013
params: { path: { playlist_sync_id }, query: { inverse: true } },
1114
});
12-
return res.data;
15+
return [res1.data, res2.data];
1316
},
1417
onSuccess: () => {
1518
toast.add({

0 commit comments

Comments
 (0)