Fix typescript issues and bump deps

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-09-02 18:52:23 +02:00
parent cb96b807a0
commit a296dbf539
6 changed files with 247 additions and 459 deletions

View File

@@ -71,16 +71,19 @@ export default class PasswordReset extends Vue {
this.errors.splice(0);
try {
const result = await this.$apollo.mutate<{ resetPassword: ILogin }>({
const { data } = await this.$apollo.mutate<{ resetPassword: ILogin }>({
mutation: RESET_PASSWORD,
variables: {
password: this.credentials.password,
token: this.token,
},
});
if (data == null) {
throw new Error('Data is undefined');
}
saveUserData(result.data.resetPassword);
this.$router.push({ name: RouteName.HOME });
saveUserData(data.resetPassword);
await this.$router.push({ name: RouteName.HOME });
} catch (err) {
console.error(err);
err.graphQLErrors.forEach(({ message }) => {