Pull Request branch dev-clone to main #1

Merged
gitea merged 429 commits from dev-clone into main 2024-12-23 09:31:34 +00:00
Showing only changes of commit 4984925dd8 - Show all commits

View File

@ -417,16 +417,8 @@ const assessmentsRoute = new Hono<HonoEnv>()
.offset(page * limit)
.limit(limit);
// Format the result to return an object where questionId is the key and optionId is the value
const formattedResult = result.reduce((acc, item) => {
if (item.questionId != null && item.optionId != null) {
acc[item.questionId] = item.optionId;
}
return acc;
}, {} as Record<string, string>); // Type assertion to ensure the accumulator is an object with string keys and values
return c.json({
data: formattedResult,
data: result.map((d) => ({ ...d, fullCount: undefined })),
_metadata: {
currentPage: page,
totalPages: Math.ceil(