Skip to content

Commit a225914

Browse files
authored
Merge pull request #86 from codeit-moving/release
Release -> main 20241227 21:13 CORS 추가
2 parents 6f7dcda + b90b349 commit a225914

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const app = express();
2626
//CORS 설정
2727
const allowedOrigins: string[] = [
2828
"http://localhost:3001",
29-
"https://52.78.245.231.nip.io", // 백엔드 도메인도 허용
29+
"https://moving-fe-e1p7.vercel.app",
3030
];
3131
// CORS 설정
3232
const corsOptions: CorsOptions = {

src/repositorys/movingRequestRepository.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ interface CursorQueryString {
1010
interface WhereCondition {
1111
keyword?: string;
1212
OR?: object[];
13-
services?: object;
13+
AND?: object[];
14+
quote?: object;
15+
movingDate?: object;
1416
}
1517

1618
interface OffsetQueryString {

src/services/movingRequestService.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,16 @@ const getMovingRequestListByMover = async (
186186
in: regions,
187187
};
188188

189+
const countCondition = {
190+
quote: whereCondition.quote,
191+
OR: whereCondition.OR,
192+
AND: whereCondition.AND,
193+
movingDate: whereCondition.movingDate,
194+
region: whereCondition.region,
195+
};
196+
189197
const serviceCountsPromise =
190-
movingRequestRepository.getMovingRequestCountByServices();
198+
movingRequestRepository.getMovingRequestCountByServices(countCondition);
191199

192200
const totalCountPromise = movingRequestRepository.getTotalCount();
193201
const designatedCountPromise =

0 commit comments

Comments
 (0)