mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 06:15:29 -04:00
Correctly type nullable columns
TypeORM columns with `nullable: true` can be `null` at runtime. This commit ensures that the types of the corresponding properties reflect that. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
d63f581a42
commit
22702b3390
6 changed files with 14 additions and 14 deletions
|
@ -39,15 +39,15 @@ export class Identity {
|
|||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
providerUserId?: string;
|
||||
providerUserId: string | null;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
oAuthAccessToken?: string;
|
||||
oAuthAccessToken: string | null;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
passwordHash?: string;
|
||||
passwordHash: string | null;
|
||||
}
|
||||
|
|
|
@ -41,12 +41,12 @@ export class User {
|
|||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
photo?: string;
|
||||
photo: string | null;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
email?: string;
|
||||
email: string | null;
|
||||
|
||||
@OneToMany((_) => Note, (note) => note.owner)
|
||||
ownedNotes: Note[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue