Adding the "UNPUBLISH" case, that should never happen

This commit is contained in:
Unknown committed 2019-02-11 14:30:58 +01:00
1 parent 20831364ef
commit fab83b13ca
1 file changed
+2
+2
View File
@@ -33,6 +33,8 @@ const resolve = (parent, { eventId: _id, state }, { userId: hostId }) => {
}
switch (state) {
case UNPUBLISHED:
throw new NotImplementedYetError('Still working on it');
case PUBLISHED:
return new Promise((res, rej) => {
Event.findOneAndUpdate({ _id, hostId, state: UNPUBLISHED }, { state }, { new: true }, (err, modifiedEvent) => {