From 1158e418b1ff5bf6ace3a41f5b49dbcb37654440 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 12 Feb 2019 14:16:56 +0100 Subject: [PATCH] Switching from finish to end --- src/models/event.js | 2 +- src/schema/queries/Events.js | 2 +- src/schema/types/Event.js | 2 +- src/schema/types/input/Event.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/models/event.js b/src/models/event.js index f0d194a87..f7bbc68af 100644 --- a/src/models/event.js +++ b/src/models/event.js @@ -34,7 +34,7 @@ const eventSchema = new Schema({ type: Number, required: true, }, - finishDatetime: { + endDatetime: { type: Number, required: true, }, diff --git a/src/schema/queries/Events.js b/src/schema/queries/Events.js index 3e7a3d44f..c5e8932a7 100644 --- a/src/schema/queries/Events.js +++ b/src/schema/queries/Events.js @@ -54,7 +54,7 @@ const resolve = (parent, { : {}, minEndDate || maxEndDate ? { - startDatetime: + endDatetime: Object.assign( minEndDate ? { $gte: minEndDate } : {}, maxEndDate ? { $lte: maxEndDate } : {}, diff --git a/src/schema/types/Event.js b/src/schema/types/Event.js index a81e1b47d..419c178ae 100644 --- a/src/schema/types/Event.js +++ b/src/schema/types/Event.js @@ -26,7 +26,7 @@ const EventType = new GraphQLObjectType({ hostId: { type: GraphQLString }, description: { type: GraphQLString }, startDatetime: { type: GraphQLInt }, - finishDatetime: { type: GraphQLInt }, + endDatetime: { type: GraphQLInt }, state: { type: EventStateEnumType }, rules: { type: new GraphQLList(RuleType), diff --git a/src/schema/types/input/Event.js b/src/schema/types/input/Event.js index aa012d070..fc0d2a814 100644 --- a/src/schema/types/input/Event.js +++ b/src/schema/types/input/Event.js @@ -17,7 +17,7 @@ const Type = new GraphQLInputObjectType({ hostId: { type: GraphQLString }, description: { type: GraphQLString }, startDatetime: { type: GraphQLInt }, - finishDatetime: { type: GraphQLInt }, + endDatetime: { type: GraphQLInt }, formulaId: { type: GraphQLString }, plotterId: { type: GraphQLString }, prizes: { type: new GraphQLList(InputPrizeType) },