We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32bffc1 commit ccfa81fCopy full SHA for ccfa81f
src/backend/services/comment.action.ts
@@ -13,14 +13,14 @@ export const getComments = async (
13
const input = CommentActionInput.getComments.parse(_input);
14
15
const query = sql`
16
- SELECT get_comments($1, $2);
+ SELECT get_comments($1, $2) as comments
17
`;
18
19
const execution_response: any = await pgClient?.executeSQL(query, [
20
input.resource_id,
21
input.resource_type,
22
]);
23
- return execution_response?.rows?.[0]?.get_comments;
+ return execution_response?.rows?.[0]?.comments || [];
24
};
25
26
export const createMyComment = async (
0 commit comments