mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-04 12:33:56 +08:00
Send x-oasst-user header
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { withoutRole } from "src/lib/auth";
|
||||
import { oasstApiClient } from "src/lib/oasst_api_client";
|
||||
import { createApiClient } from "src/lib/oasst_api_client";
|
||||
|
||||
/**
|
||||
* Returns the set of valid labels that can be applied to messages.
|
||||
*/
|
||||
const handler = withoutRole("banned", async (req, res) => {
|
||||
const valid_labels = await oasstApiClient.fetch_valid_text();
|
||||
const handler = withoutRole("banned", async (req, res, token) => {
|
||||
const client = await createApiClient(token);
|
||||
const valid_labels = await client.fetch_valid_text();
|
||||
res.status(200).json(valid_labels);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user