mirror of
https://github.com/karma-riuk/crab-webapp.git
synced 2025-07-06 06:28:12 +02:00
added table to show results in frontend
This commit is contained in:
@ -80,11 +80,18 @@ router.post("/submit/comments", upload.single("file"), async (req, res) => {
|
||||
io.to(socketId).emit("started-processing");
|
||||
}
|
||||
|
||||
evaluate_comments(validatedData, (percent) => {
|
||||
if (!(socketId && io.sockets.sockets.has(socketId))) return;
|
||||
evaluate_comments(
|
||||
validatedData,
|
||||
(percent) => {
|
||||
if (!(socketId && io.sockets.sockets.has(socketId))) return;
|
||||
|
||||
io.to(socketId).emit("progress", { percent });
|
||||
});
|
||||
io.to(socketId).emit("progress", { percent });
|
||||
},
|
||||
(results) => {
|
||||
if (!(socketId && io.sockets.sockets.has(socketId))) return;
|
||||
io.to(socketId).emit("ended-processing", results);
|
||||
},
|
||||
);
|
||||
|
||||
res.status(200).json({
|
||||
message: "Answer submitted successfully",
|
||||
|
Reference in New Issue
Block a user