import { HTTPBody } from "@fastify-modular/route"; import { pito } from "pito"; import { NeedLogin } from "../defines"; // ===================================================================================== export const CompleteMarginParam = pito.Obj({ dealId: pito.Num(), }); export type CompleteMarginParam = pito.Type; // ===================================================================================== export const CompleteMarginOutput = pito.Obj({}); export type CompleteMarginOutput = pito.Type; // ===================================================================================== export const CompleteMargin = HTTPBody( "POST", "/api/v1/admin/deal/margin/complete/:dealId", "admin" ) .params(CompleteMarginParam) .response(CompleteMarginOutput) .presets(NeedLogin) .build();