Skip to content

Commit

Permalink
edit optional parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Szotkowski committed Sep 20, 2023
1 parent 901f7ff commit cd78e80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/models/instruction.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class Instruction extends Entity {
userId: number;

@hasMany(() => Step, {keyTo: 'instructionId'})
steps: Step[];
steps?: Step[];

constructor(data?: Partial<Instruction>) {
super(data);
Expand Down
6 changes: 3 additions & 3 deletions src/models/user.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,13 @@ export class User extends Entity {
keyTo: 'followeeId',
},
})
users: User[];
users?: User[];

@hasMany(() => Instruction, {keyTo: 'userId'})
instructions: Instruction[];
instructions?: Instruction[];

@hasMany(() => Progress, {keyTo: 'userId'})
progresses: Progress[];
progresses?: Progress[];

constructor(data?: Partial<User>) {
super(data);
Expand Down

0 comments on commit cd78e80

Please sign in to comment.