Creazione Sito Web da pagina

This commit is contained in:
Surya Paolo
2023-12-08 14:07:39 +01:00
parent bb9ca970f8
commit 7e17869d3e
11 changed files with 306 additions and 19 deletions

View File

@@ -865,6 +865,24 @@ export const useUserStore = defineStore('UserStore', {
})
},
async addNewSite(paramquery: any) {
console.log(paramquery)
this.setServerCode(tools.CALLING)
return bcrypt.hash(paramquery.password, bcrypt.genSaltSync(12))
.then((hashedPassword: string) => {
paramquery.password = String(hashedPassword)
return Api.SendReq('/addNewSite', 'POST', paramquery)
.then((res) => ({ code: res.data.code, msg: res.data.msg, idapp: res.data.idapp }))
.catch((error) => {
this.setErrorCatch(error)
return this.getServerCode
})
})
},
async vreg(paramquery: ILinkReg) {
const usertosend = {
idlink: paramquery.idlink,