|
@@ -159,7 +159,7 @@ export const useMainStore = defineStore("MainStoreId", {
|
|
|
}, payload.timeout);
|
|
|
});
|
|
|
},
|
|
|
- async register(payload: IUserProfileRegister) {
|
|
|
+ async register(payload: IUserProfileCreate) {
|
|
|
const loadingNotification = {
|
|
|
content: "Sgining up...",
|
|
|
showProgress: true,
|
|
@@ -181,7 +181,7 @@ export const useMainStore = defineStore("MainStoreId", {
|
|
|
await this.checkApiError(error);
|
|
|
}
|
|
|
},
|
|
|
- async passwordRecovery(payload: {username: string }) {
|
|
|
+ async passwordRecovery(username: string ) {
|
|
|
const loadingNotification = {
|
|
|
content: "Sending password recovery email",
|
|
|
showProgress: true,
|
|
@@ -189,7 +189,7 @@ export const useMainStore = defineStore("MainStoreId", {
|
|
|
try {
|
|
|
this.addNotification(loadingNotification);
|
|
|
await Promise.all([
|
|
|
- api.passwordRecovery(payload.username),
|
|
|
+ api.passwordRecovery(username),
|
|
|
await new Promise<void>((resolve, _) => setTimeout(() => resolve(), 500)),
|
|
|
]);
|
|
|
this.removeNotification(loadingNotification);
|
|
@@ -203,12 +203,12 @@ export const useMainStore = defineStore("MainStoreId", {
|
|
|
this.addNotification({ color: "error", content: "Incorrect username" });
|
|
|
}
|
|
|
},
|
|
|
- async resetPassword(payload: {password: string; token: string }) {
|
|
|
+ async resetPassword(password: string, token: string) {
|
|
|
const loadingNotification = { content: "Resetting password", showProgress: true };
|
|
|
try {
|
|
|
this.addNotification(loadingNotification);
|
|
|
await Promise.all([
|
|
|
- api.resetPassword(payload.password, payload.token),
|
|
|
+ api.resetPassword(token, password),
|
|
|
await new Promise<void>((resolve, _) => setTimeout(() => resolve(), 500)),
|
|
|
]);
|
|
|
this.removeNotification(loadingNotification);
|