Skip to content

Commit c00ff93

Browse files
committed
Ajout fonction clearDb
1 parent 64076e4 commit c00ff93

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/store/planning.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const usePlanning = defineStore('planning', () => {
1111
return client.subscribeMonth({ userId: user.userId }, month)
1212
}
1313

14-
async function unsubscribeMonth({ userId, month }) {
14+
async function unsubscribeMonth(month) {
1515
return client.unsubscribeMonth(user.userId, month)
1616
}
1717

@@ -32,6 +32,10 @@ export const usePlanning = defineStore('planning', () => {
3232
return client.bulkUpdate(updateLog)
3333
}
3434

35+
async function clearDb() {
36+
return client.clearDb()
37+
}
38+
3539
// Reactive data functions
3640
function getDay(date) {
3741
return client.getDay(user.userId, date)
@@ -48,6 +52,7 @@ export const usePlanning = defineStore('planning', () => {
4852
subscribeInterval,
4953
unsubscribe,
5054
bulkUpdate,
55+
clearDb,
5156
getDay,
5257
getEvent
5358
}

0 commit comments

Comments
 (0)