From 067141dc52341fb6b9205ec4770856d084a74f59 Mon Sep 17 00:00:00 2001 From: Paolo Brasolin <paolo.brasolin@eurac.edu> Date: Wed, 23 Feb 2022 15:32:08 +0100 Subject: [PATCH] feat: record minimal transcription data --- backend/src/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index a98b858..24c38ae 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -85,7 +85,13 @@ server.route<{ Body: FromSchema<typeof CheckTranscriptionBodySchema> }>({ }, }, }, - handler: function (request, reply) { + handler: async function (request, reply) { + // TODO: actually check the word + await connection.table("game_results").insert({ + id_image: request.body.refData.id, + transcription: request.body.transcription, + gametime: request.body.deltaTime, + }); reply.send({ hitTheTarget: true, }); -- GitLab