import {HTTPBody} from '@fastify-modular/route'; import {pito} from 'pito'; import {NeedLogin} from '../defines'; // ========================================================================== export const UpdateQNACommentParam = pito.Obj({commentId: pito.Num()}); export type UpdateQNACommentParam = pito.Type; // ========================================================================== export const UpdateQNACommentInput = pito.Obj({ commentId: pito.Num(), contents : pito.Str(), }); export type UpdateQNACommentInput = pito.Type; // ========================================================================== export const UpdateQNAComment = HTTPBody('PATCH', '/api/v1/product/update-qna-comment/:commentId', 'cs') .params(UpdateQNACommentParam) .body(UpdateQNACommentInput) .presets(NeedLogin) .build(); // ==========================================================================