(props)
| 28 | public readonly passwordSalt: string | undefined; |
| 29 | |
| 30 | constructor(props) { |
| 31 | if (!props.id) { |
| 32 | throw new Error(`Error instantiating User, id invalid: ${props.id}`); |
| 33 | } |
| 34 | |
| 35 | validateUsername(props); |
| 36 | |
| 37 | this.id = props.id; |
| 38 | this.about = props.about || ''; |
| 39 | this.creationTime = props.creationTime || +new Date(); |
| 40 | this.dateOfBirth = props.dateOfBirth || null; |
| 41 | this.email = props.email || null; |
| 42 | this.firstName = props.firstName || null; |
| 43 | this.hides = props.hides || []; |
| 44 | this.karma = props.karma || 1; |
| 45 | this.lastName = props.lastName || null; |
| 46 | this.likes = props.likes || []; |
| 47 | this.posts = props.posts || []; |
| 48 | this.hashedPassword = props.hashedPassword || undefined; |
| 49 | this.passwordSalt = props.passwordSalt || undefined; |
| 50 | } |
| 51 | } |
nothing calls this directly
no test coverage detected