Initial role user app
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { proxyBackendJson } from "@/lib/backend";
|
||||
import type { TaskDetail } from "@/lib/types";
|
||||
|
||||
type Params = {
|
||||
params: Promise<{ id: string }>;
|
||||
};
|
||||
|
||||
export async function POST(request: Request, { params }: Params) {
|
||||
const { id } = await params;
|
||||
const body = await request.text();
|
||||
|
||||
return proxyBackendJson<TaskDetail>(`/mobile/tasks/${encodeURIComponent(id)}/comment`, {
|
||||
method: "POST",
|
||||
body: body || undefined
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user