Fix incomplete api error message

pull/4/head
Trivernis 5 years ago
parent 162aed30dc
commit 82ded854ee

@ -498,7 +498,7 @@ export function resolver(req: any, res: any): any {
if (!nameExists) { if (!nameExists) {
return models.Activity.create({name, description, points}); return models.Activity.create({name, description, points});
} else { } else {
return new GraphQLError(`An activity with the name '${name}'`); return new GraphQLError(`An activity with the name '${name}' already exists.`);
} }
} else { } else {
res.status(status.FORBIDDEN); res.status(status.FORBIDDEN);

Loading…
Cancel
Save