diff --git a/packages/api/services/coa/stories/index.ts b/packages/api/services/coa/stories/index.ts index 4b666de4..36a04263 100644 --- a/packages/api/services/coa/stories/index.ts +++ b/packages/api/services/coa/stories/index.ts @@ -24,10 +24,12 @@ export default (socket: Socket) => { and eu.sitecode = 'webusers' group by s.storycode`, ]) - .then(([stories, storyUrls]) => ({ - stories: stories.groupBy("storycode"), - storyUrls: storyUrls.groupBy("storycode", "url"), - })) + .then(([stories, storyUrls]) => { + callback({ + stories: stories.groupBy("storycode"), + storyUrls: storyUrls.groupBy("storycode", "url"), + }); + }) .catch((e) => { callback({ error: "Error", errorDetails: e }); }),