Correcting last occurence of "event" from boilerplate
This commit is contained in:
1 parent
60cf41c2f6
commit
4166ed883c
2 files changed
+5
-5
No files matched your search
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -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) },
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user