Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
feat: maek notes nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
YanceyOfficial committed Feb 3, 2020
1 parent 1226d99 commit 7dd9298
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 4 additions & 2 deletions schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type AgendaModel {
startDate: DateTime!
endDate: DateTime
allDay: Boolean!
notes: String!
notes: String
rRule: String
exDate: DateTime
createdAt: DateTime!
Expand Down Expand Up @@ -65,7 +65,7 @@ input CreateAgendaInput {
title: String!
startDate: String!
allDay: Boolean!
notes: String!
notes: String
endDate: String
rRule: String
exDate: String
Expand Down Expand Up @@ -282,6 +282,8 @@ input UpdateAgendaInput {
title: String!
startDate: String!
endDate: String
allDay: Boolean!
notes: String
rRule: String
exDate: String
}
Expand Down
5 changes: 2 additions & 3 deletions src/agenda/dtos/create-agenda.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ export class CreateAgendaInput {
@IsBoolean()
public readonly allDay: boolean

@Field()
@IsString()
public readonly notes: string
@Field({ nullable: true })
public readonly notes?: string

@Field({ nullable: true })
public readonly endDate?: string
Expand Down
5 changes: 2 additions & 3 deletions src/agenda/dtos/update-agenda.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ export class UpdateAgendaInput {
@IsBoolean()
public readonly allDay: boolean

@Field()
@IsString()
public readonly notes: string
@Field({ nullable: true })
public readonly notes?: string

@Field({ nullable: true })
public readonly rRule?: string
Expand Down
4 changes: 2 additions & 2 deletions src/agenda/models/agenda.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export class AgendaModel {
@Field()
public allDay: boolean

@Field()
public notes: string
@Field({ nullable: true })
public notes?: string

@Field({ nullable: true })
public rRule?: string
Expand Down
2 changes: 1 addition & 1 deletion src/agenda/schemas/agenda.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const AgendaSchema = new mongoose.Schema(
},
notes: {
type: String,
required: true,
required: false,
},
rRule: {
type: String,
Expand Down

0 comments on commit 7dd9298

Please sign in to comment.