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/product/deal/margin/complete/:dealId', 'deal') .params(CompleteMarginParam) .response(CompleteMarginOutput) .presets(NeedLogin) .build();