Skip to content

Commit b606559

Browse files
committed
feat : workspace/info params 타입 달기
1 parent 9f2b44a commit b606559

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

server/apis/workspace/controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import asyncWrapper from '@utils/async-wrapper';
33
import jwtAuthenticator from '@middlewares/jwt-authenticator';
44
import * as workspaceService from './service';
55
import { CREATED } from '@constants/http-status';
6-
import { PostParams, PostJoinParams } from '@params/workspace';
6+
import { PostParams, PostJoinParams, GetInfoParams } from '@params/workspace';
77

88
const router = express.Router();
99

@@ -36,7 +36,7 @@ router.post(
3636
router.get(
3737
'/:id',
3838
jwtAuthenticator,
39-
asyncWrapper(async (req: Request, res: Response) => {
39+
asyncWrapper(async (req: Request<GetInfoParams>, res: Response) => {
4040
const { id: workspaceId } = req.params;
4141

4242
const workspaceInfo = await workspaceService.info(Number(workspaceId));

types/params/workspace.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ export interface PostParams {
55
export interface PostJoinParams {
66
code: string;
77
}
8+
9+
export interface GetInfoParams {
10+
id: string;
11+
}

0 commit comments

Comments
 (0)