Notifiche all'Utente

Pannello Utente (backoffice)
This commit is contained in:
Paolo Arena
2022-07-16 14:20:22 +02:00
parent 7f25ca4717
commit 7006d62cae
17 changed files with 174 additions and 32 deletions

View File

@@ -54,6 +54,7 @@ export const DefaultUser: IUserFields = {
manage_mygroups: [],
asked_friends: [],
asked_groups: [],
notifs: 15,
},
cart: {
userId: '',
@@ -99,6 +100,7 @@ export const DefaultProfile: IUserProfile = {
manage_mygroups: [],
asked_friends: [],
asked_groups: [],
notifs: 15,
}
export const useUserStore = defineStore('UserStore', {
@@ -991,6 +993,21 @@ export const useUserStore = defineStore('UserStore', {
},
async setUserNotifs(notifs: number) {
const data = {
notifs
}
return Api.SendReq('/users/notifs', 'POST', data)
.then((ris) => {
return ris.data
}).catch((error) => {
return {}
})
},
async loadUserPanel(username: string) {
const data = {
username