mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-10-01 11:41:14 +08:00
Fetch available tasks
This commit is contained in:
1 parent
c81967fca9
commit
e80a69dd8a
8 files changed
+62
-17
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import { withoutRole } from "src/lib/auth";
|
||||
import { oasstApiClient } from "src/lib/oasst_api_client";
|
||||
import { getBackendUserCore } from "src/lib/users";
|
||||
|
||||
const handler = withoutRole("banned", async (req, res, token) => {
|
||||
const user = await getBackendUserCore(token.sub);
|
||||
const availableTasks = await oasstApiClient.fetch_available_tasks(user);
|
||||
res.status(200).json(availableTasks);
|
||||
});
|
||||
|
||||
export default handler;
|
||||
Reference in new issue
Block a user