Skip to content

Commit

Permalink
api: Fix getStoryDetails callback
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed Jan 25, 2025
1 parent 9f0a9ca commit f5931a0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/api/services/coa/stories/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ export default (socket: Socket<Events>) => {
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 });
}),
Expand Down

0 comments on commit f5931a0

Please sign in to comment.