move oauth api
This commit is contained in:
parent
7a02ae396e
commit
d2dcdfbd80
10 changed files with 204 additions and 281 deletions
|
|
@ -86,18 +86,20 @@ export const useAnnouncementsStore = defineStore('announcements', {
|
|||
}
|
||||
},
|
||||
markAnnouncementAsRead(id) {
|
||||
return this.userActions.dismissAnnouncement({
|
||||
id,
|
||||
credentials: useOAuthStore().token,
|
||||
}).then(() => {
|
||||
const index = this.announcements.findIndex((a) => a.id === id)
|
||||
return this.userActions
|
||||
.dismissAnnouncement({
|
||||
id,
|
||||
credentials: useOAuthStore().token,
|
||||
})
|
||||
.then(() => {
|
||||
const index = this.announcements.findIndex((a) => a.id === id)
|
||||
|
||||
if (index < 0) {
|
||||
return
|
||||
}
|
||||
if (index < 0) {
|
||||
return
|
||||
}
|
||||
|
||||
this.announcements[index].read = true
|
||||
})
|
||||
this.announcements[index].read = true
|
||||
})
|
||||
},
|
||||
startFetchingAnnouncements() {
|
||||
if (this.fetchAnnouncementsTimer) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue