14 lines
391 B
TypeScript
14 lines
391 B
TypeScript
import { proxyBackendJson } from "@/lib/backend";
|
|
import type { AnnouncementDetail } from "@/lib/types";
|
|
|
|
type Params = {
|
|
params: Promise<{ id: string }>;
|
|
};
|
|
|
|
export async function POST(_request: Request, { params }: Params) {
|
|
const { id } = await params;
|
|
return proxyBackendJson<AnnouncementDetail>(`/mobile/announcements/${encodeURIComponent(id)}/read`, {
|
|
method: "POST"
|
|
});
|
|
}
|