mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-27 16:10:30 +08:00
fix: Removed console logs.
This commit is contained in:
@@ -13,22 +13,10 @@ const handler = async (req, res) => {
|
||||
res.status(401).end();
|
||||
return;
|
||||
}
|
||||
console.log(JSON.parse(req.body));
|
||||
// Parse out the local task ID and the interaction contents.
|
||||
const { post_id, label_map, text } = await JSON.parse(req.body);
|
||||
console.log(JSON.stringify(
|
||||
{
|
||||
"type": "text_labels",
|
||||
"message_id": post_id,
|
||||
"labels": label_map,
|
||||
"text": text,
|
||||
"user": {
|
||||
"id": token.sub,
|
||||
"display_name": token.name || token.email,
|
||||
"auth_method": "local",
|
||||
}}));
|
||||
console.log("Here sending text_labels1...");
|
||||
// Send the interaction to the Text Label to the Backend.
|
||||
|
||||
// Parse out the local message_id, task ID and the interaction contents.
|
||||
const { message_id, post_id, label_map, text } = await JSON.parse(req.body);
|
||||
|
||||
const interactionRes = await fetch(`${process.env.FASTAPI_URL}/api/v1/text_labels`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
@@ -37,7 +25,7 @@ const handler = async (req, res) => {
|
||||
},
|
||||
body: JSON.stringify({
|
||||
"type": "text_labels",
|
||||
"message_id": post_id,
|
||||
"message_id": message_id,
|
||||
"labels": label_map,
|
||||
"text": text,
|
||||
"user": {
|
||||
@@ -48,7 +36,6 @@ const handler = async (req, res) => {
|
||||
|
||||
}),
|
||||
});
|
||||
console.log(interactionRes);
|
||||
res.status(interactionRes.status).json(interactionRes.json());
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user