import {HTTPBody} from '@fastify-modular/route'; import {pito} from 'pito'; import {NeedLogin} from '../defines'; // ========================================================================== export const CreateQNAInput = pito.Obj({ title : pito.Str(), contents: pito.Str(), userId : pito.Num(), qnaType : pito.Num(), }); export type CreateQNAInput = pito.Type; // ========================================================================== export const CreateQNAOutput = pito.Obj({ qnaId: pito.Num(), }); export type CreateQNAOutput = pito.Type; // ========================================================================== export const CreateQNA = HTTPBody('POST', '/api/v1/product/create-qna', 'cs') .body(CreateQNAInput) .response(CreateQNAOutput) .presets(NeedLogin) .build();