Skip to content

Commit 40fd3f0

Browse files
committed
Define types in separate file
1 parent df8ef53 commit 40fd3f0

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

backend/qn-history-service/src/controllers/questionHistoryController.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import {
77
PAGE_LIMIT_INCORRECT_FORMAT_MESSAGE,
88
PAGE_LIMIT_USERID_ORDER_REQUIRED_MESSAGE,
99
QN_HIST_CREATED_MESSAGE,
10-
QN_HIST_DELETED_MESSAGE,
1110
QN_HIST_NOT_FOUND_MESSAGE,
1211
QN_HIST_RETRIEVED_MESSAGE,
1312
SERVER_ERROR_MESSAGE,
1413
} from "../utils/constants.ts";
14+
import { QnHistListParams } from "../utils/types.ts";
1515

1616
export const createQnHistory = async (
1717
req: Request,
@@ -83,15 +83,6 @@ export const updateQnHistory = async (
8383
}
8484
};
8585

86-
type QnHistListParams = {
87-
page: string;
88-
qnHistLimit: string;
89-
userId: string;
90-
title: string; //qn title search keyword
91-
status: string; //submission status
92-
order: string; //entries sort order
93-
};
94-
9586
export const readQnHistoryList = async (
9687
req: Request<unknown, unknown, unknown, QnHistListParams>,
9788
res: Response
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export type QnHistListParams = {
2+
page: string;
3+
qnHistLimit: string;
4+
userId: string;
5+
title: string; //qn title search keyword
6+
status: string; //submission status
7+
order: string; //entries sort order
8+
};

0 commit comments

Comments
 (0)