import { HTTPBody } from '@fastify-modular/route'; import { pito } from 'pito'; import { PriceDefine, NeedLogin } from '..'; // ========================================================================== export const UpdateSellPriceInput = pito.Obj({ price: PriceDefine, }); export type UpdateSellPriceInput = pito.Type; // ========================================================================== export const UpdateSellPriceOption = pito.Obj({}); export type UpdateSellPriceOption = pito.Type; // ========================================================================== export const UpdateSellPriceOutput = pito.Obj({}); export type UpdateSellPriceOutput = pito.Type; // ========================================================================== export const UpdateSellPrice = HTTPBody('PATCH', '/api/v1/product/update-sell-price/:sell_id', 'order') .params(pito.Obj({ sell_id: pito.Num() })) .body(UpdateSellPriceInput) .query(UpdateSellPriceOption) .response(UpdateSellPriceOutput) .presets(NeedLogin) .build(); // ==========================================================================