the cleanup
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { springProxy } from "@/lib/springProxy";
|
||||
import type {
|
||||
MerchantAdminCreateRequest,
|
||||
MerchantAdminResponse,
|
||||
} from "@/types/merchant-admin";
|
||||
|
||||
export async function GET(req: Request) {
|
||||
return springProxy<MerchantAdminResponse[]>(req, "/api/v1/admin/merchants");
|
||||
}
|
||||
|
||||
export async function POST(req: Request) {
|
||||
const body = (await req.json()) as MerchantAdminCreateRequest;
|
||||
|
||||
return springProxy<MerchantAdminResponse, MerchantAdminCreateRequest>(
|
||||
req,
|
||||
"/api/v1/admin/merchants",
|
||||
{ method: "POST", body }
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user