import { HTTPBody } from '@fastify-modular/route'; import { pito } from 'pito'; import { NeedLogin } from '../defines'; // ========================================================================== export const RemoveProductImageParams = pito.Obj({ imageId: pito.UUID() }); export type RemoveProductImageParams = pito.Type; // ========================================================================== export const RemoveProductImageOutput = pito.Obj({}); export type RemoveProductImageOutput = pito.Type; // ========================================================================== export const RemoveProductImage = HTTPBody('DELETE', '/api/v1/product/remove-product-image/:imageId', 'user') .params(RemoveProductImageParams) .response(RemoveProductImageOutput) .presets(NeedLogin) .build(); // ==========================================================================