think/packages/domains/src/api/comment.ts

40 lines
763 B
TypeScript
Raw Normal View History

2022-05-23 05:05:59 +00:00
import { IComment, IDocument } from '../models';
export const CommentApiDefinition = {
/**
*
*/
add: {
method: 'Post' as const,
server: 'add' as const,
client: () => '/comment/add',
},
/**
*
*/
update: {
method: 'Patch' as const,
server: 'update' as const,
client: () => '/comment/update',
},
/**
*
*/
delete: {
method: 'Delete' as const,
server: 'delete/:id' as const,
client: (id: IComment['id']) => `/comment/delete/${id}`,
},
/**
*
*/
documents: {
method: 'Get' as const,
server: 'document/:documentId' as const,
client: (documentId: IDocument['id']) => `/comment/document/${documentId}`,
},
};