Skip to content

Commit

Permalink
Autocorrect startTime and endTime order in GQL helper
Browse files Browse the repository at this point in the history
  • Loading branch information
zartre committed Apr 29, 2018
1 parent 47d0302 commit 8009ccd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helpers/gql.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ ghp.createRequest = (apollo_auth, rq) => {
"requestInput": {
"dates": [rq.date],
"period": {
"start": parseInt(rq.start),
"end": parseInt(rq.end)
"start": Math.min(parseInt(rq.start), parseInt(rq.end)),
"end": Math.max(parseInt(rq.start), parseInt(rq.end))
},
"spaceId": rq.space,
"body": rq.reason,
Expand Down

0 comments on commit 8009ccd

Please sign in to comment.