Skip to content

Commit 2e98fef

Browse files
committed
lint
1 parent f1b78ad commit 2e98fef

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

app/api/thread-reply/route.ts

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@ export async function POST(request: Request) {
55
// In production validation of the request body might be necessary.
66
const body = await request.json();
77

8-
const replyRes = await plainClient.replyToThread({textContent: body.message, threadId: body.threadId})
9-
if (replyRes.error) {
10-
console.error(
11-
inspect(replyRes.error, {
12-
showHidden: false,
13-
depth: null,
14-
colors: true,
15-
})
16-
);
17-
return new Response(replyRes.error.message, { status: 500 });
18-
}
8+
const replyRes = await plainClient.replyToThread({
9+
textContent: body.message,
10+
threadId: body.threadId,
11+
});
12+
if (replyRes.error) {
13+
console.error(
14+
inspect(replyRes.error, {
15+
showHidden: false,
16+
depth: null,
17+
colors: true,
18+
})
19+
);
20+
return new Response(replyRes.error.message, { status: 500 });
21+
}
1922

20-
console.log('Replied to thread', body.threadId);
21-
return new Response("", { status: 200 });
22-
}
23+
console.log("Replied to thread", body.threadId);
24+
return new Response("", { status: 200 });
25+
}

0 commit comments

Comments
 (0)