Correcting last occurence of "event" from boilerplate

This commit is contained in:
Unknown committed 2019-03-16 12:43:23 +01:00
1 parent 60cf41c2f6
commit 4166ed883c
2 files changed
+5 -5

No files matched your search

+3 -3
View File
@@ -11,16 +11,16 @@ const args = {
};
const resolve = (parent, { fbId }) => new Promise((res, rej) => {
Strategy.findOne({ fbId }).exec((err, event) => {
Strategy.findOne({ fbId }).exec((err, strategy) => {
if (err) {
rej(err);
return;
}
if (!event) {
if (!strategy) {
rej(new DatabaseError('None of the strategy are linked to that fbId'));
return;
}
res(event);
res(strategy);
});
});
+2 -2
View File
@@ -5,8 +5,8 @@ import {
import SubStrategyType from './SubStrategy';
const Type = new GraphQLInputObjectType({
name: 'EventInput',
description: 'Payload for event input',
name: 'StrategyInput',
description: 'Payload for strategy input',
fields: () => ({
subStrategies: { type: new GraphQLList(SubStrategyType) },
}),