diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-04-13 20:02:31 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-04-13 20:02:31 +0900 |
| commit | 343f2f1f332f9e5328dbd01166b7acc00927b8ce (patch) | |
| tree | d25299f7b6f9a627069950e45f595094395b4f61 /src/models | |
| parent | Clean up (diff) | |
| download | sharkey-343f2f1f332f9e5328dbd01166b7acc00927b8ce.tar.gz sharkey-343f2f1f332f9e5328dbd01166b7acc00927b8ce.tar.bz2 sharkey-343f2f1f332f9e5328dbd01166b7acc00927b8ce.zip | |
Fix bug
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/entities/auth-session.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/models/entities/auth-session.ts b/src/models/entities/auth-session.ts index 83f8365630..4eec27e3f6 100644 --- a/src/models/entities/auth-session.ts +++ b/src/models/entities/auth-session.ts @@ -19,11 +19,15 @@ export class AuthSession { }) public token: string; - @Column(id()) + @Column({ + ...id(), + nullable: true + }) public userId: User['id']; @ManyToOne(type => User, { - onDelete: 'CASCADE' + onDelete: 'CASCADE', + nullable: true }) @JoinColumn() public user: User | null; |