forked from vikunja/frontend
Dominik Pschenitschni
96f5f00c07
We used declare which is the wrong use-case for this. See: https://www.typescriptlang.org/docs/handbook/2/classes.html#--strictpropertyinitialization
27 lines
478 B
TypeScript
27 lines
478 B
TypeScript
import AbstractModel from './abstractModel'
|
|
|
|
export interface IPasswordReset extends AbstractModel {
|
|
token: string
|
|
newPassword: string
|
|
email: string
|
|
}
|
|
|
|
export default class PasswordResetModel extends AbstractModel implements IPasswordReset {
|
|
token: string
|
|
newPassword!: string
|
|
email!: string
|
|
|
|
constructor(data) {
|
|
super(data)
|
|
|
|
this.token = localStorage.getItem('passwordResetToken')
|
|
}
|
|
|
|
defaults() {
|
|
return {
|
|
token: '',
|
|
newPassword: '',
|
|
email: '',
|
|
}
|
|
}
|
|
} |