get things working again

This commit is contained in:
Moriz Wahl 2021-11-25 11:56:15 +01:00
parent 2ea309643c
commit 4d57487f8f
3 changed files with 14 additions and 12 deletions

View File

@ -2,9 +2,6 @@
import { AuthChecker } from 'type-graphql'
import CONFIG from '../../config'
import { apiGet } from '../../apis/HttpRequest'
import decode from '../../jwt/decode'
import encode from '../../jwt/encode'

View File

@ -10,15 +10,17 @@ export class User {
@PrimaryGeneratedColumn()
id: number
*/
constructor(json: any) {
this.email = json.email
this.firstName = json.first_name
this.lastName = json.last_name
this.username = json.username
this.description = json.description
this.pubkey = json.public_hex
this.language = json.language
this.publisherId = json.publisher_id
constructor(json?: any) {
if (json) {
this.email = json.email
this.firstName = json.first_name
this.lastName = json.last_name
this.username = json.username
this.description = json.description
this.pubkey = json.public_hex
this.language = json.language
this.publisherId = json.publisher_id
}
}
@Field(() => String)

View File

@ -9,6 +9,9 @@ export class LoginUserBackup extends BaseEntity {
@Column({ type: 'text', name: 'passphrase', nullable: false })
passphrase: string
@Column({ name: 'user_id', nullable: false })
userId: number
@Column({ name: 'mnemonic_type', default: -1 })
mnemonicType: number