mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-09-12 12:03:06 +08:00
Change typings & refactor FlaggableElement
This commit is contained in:
@@ -5,8 +5,8 @@ import { withoutRole } from "src/lib/auth";
|
||||
*
|
||||
*/
|
||||
const handler = withoutRole("banned", async (req, res, token) => {
|
||||
// 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);
|
||||
// Parse out the local message_id, and the interaction contents.
|
||||
const { message_id, label_map, text } = await JSON.parse(req.body);
|
||||
|
||||
const interactionRes = await fetch(`${process.env.FASTAPI_URL}/api/v1/text_labels`, {
|
||||
method: "POST",
|
||||
@@ -16,7 +16,7 @@ const handler = withoutRole("banned", async (req, res, token) => {
|
||||
},
|
||||
body: JSON.stringify({
|
||||
type: "text_labels",
|
||||
message_id: message_id || post_id,
|
||||
message_id: message_id,
|
||||
labels: label_map,
|
||||
text: text,
|
||||
user: {
|
||||
|
||||
Reference in New Issue
Block a user