Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:エントリー削除のスキーマを定義 #367

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/kcms/src/team/adaptor/validator/team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@ const EntryTeamParamsSchema = z.object({
});

export const PostEntryTeamParamsSchema = EntryTeamParamsSchema;

export const DeleteEntryTeamParamsSchema = EntryTeamParamsSchema;
24 changes: 23 additions & 1 deletion packages/kcms/src/team/routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
PostTeamsResponseSchema,
DeleteTeamParamsSchema,
PostEntryTeamParamsSchema,
DeleteEntryTeamParamsSchema,
} from './adaptor/validator/team';

export const GetTeamsRoute = createRoute({
Expand Down Expand Up @@ -85,7 +86,7 @@ export const DeleteTeamRoute = createRoute({
},
});

export const EntryTeamRoute = createRoute({
export const PostEntryTeamRoute = createRoute({
method: 'post',
path: '/team/{teamId}/entry',
request: {
Expand All @@ -105,3 +106,24 @@ export const EntryTeamRoute = createRoute({
},
},
});

export const DeleteEntryTeamRoute = createRoute({
method: 'delete',
path: '/team/{teamId}/entry',
request: {
params: DeleteEntryTeamParamsSchema,
},
responses: {
204: {
description: 'Delete Entry Team',
},
400: {
content: {
'application/json': {
schema: CommonErrorSchema,
},
},
description: 'Common Error',
},
},
});