Skip to content

Commit

Permalink
data-explorer: refine get question answer response
Browse files Browse the repository at this point in the history
  • Loading branch information
Mini256 committed Nov 11, 2023
1 parent 38af275 commit 72ccfd0
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,17 @@ export const newQuestionHandler: FastifyPluginAsyncJsonSchemaToTs = async (app):
}
}

reply.status(200).send(resolvedQuestion);
reply.status(200).send({
question: {
title: resolvedQuestion.title,
revisedTitle: resolvedQuestion.revisedTitle,
link: 'https://ossinsight.io/explore/?id=' + resolvedQuestion.id,
},
query: {
sql: resolvedQuestion.querySQL,
},
result: resolvedQuestion.result
});
});
}

Expand Down

0 comments on commit 72ccfd0

Please sign in to comment.