mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-20 12:10:50 +08:00
Fixing some build and lint errors
This commit is contained in:
@@ -14,7 +14,7 @@ interface UserMessagesCellProps {
|
||||
/**
|
||||
* Fetches the messages corresponding to a user and presents them in a table.
|
||||
*/
|
||||
const UserMessagesCell = ({ path }) => {
|
||||
const UserMessagesCell = ({ path }: UserMessagesCellProps) => {
|
||||
const url = path || "/api/messages/user";
|
||||
const { data: messages, isLoading } = useSWR(url, fetcher, {
|
||||
refreshInterval: 2000,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { withRole } from "src/lib/auth";
|
||||
|
||||
const handler = withRole("admin", async (req, res, token) => {
|
||||
const handler = withRole("admin", async (req, res) => {
|
||||
const { user } = req.query;
|
||||
|
||||
const messagesRes = await fetch(`${process.env.FASTAPI_URL}/api/v1/frontend_users/local/${user}/messages`, {
|
||||
|
||||
Reference in New Issue
Block a user