Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
90b4d07
Merge pull request #12 from WE-EMS/develop
rimit-rim Aug 13, 2025
436f845
Merge pull request #15 from WE-EMS/develop
rimit-rim Aug 14, 2025
15edb19
Merge pull request #17 from WE-EMS/develop
rimit-rim Aug 14, 2025
b3a4cae
Merge pull request #20 from WE-EMS/develop
rimit-rim Aug 16, 2025
ce37687
✨Feat: AWS S3 파일 업로드
rimit-rim Aug 16, 2025
059372a
Merge pull request #26 from WE-EMS/develop
rimit-rim Aug 17, 2025
a30988b
Merge pull request #29 from WE-EMS/develop
rimit-rim Aug 18, 2025
fc03dac
Merge pull request #31 from WE-EMS/develop
rimit-rim Aug 19, 2025
60244a1
Merge pull request #34 from WE-EMS/develop
rimit-rim Aug 19, 2025
3904aa4
Merge pull request #37 from WE-EMS/develop
rimit-rim Aug 20, 2025
ea84b59
Merge pull request #40 from WE-EMS/develop
rimit-rim Aug 20, 2025
3951b60
Merge pull request #43 from WE-EMS/develop
rimit-rim Aug 20, 2025
b874bf2
Merge pull request #46 from WE-EMS/develop
rimit-rim Aug 20, 2025
f93140e
Merge pull request #49 from WE-EMS/develop
rimit-rim Aug 21, 2025
8a578e9
Merge pull request #52 from WE-EMS/develop
rimit-rim Aug 21, 2025
3b046da
Merge pull request #55 from WE-EMS/develop
rimit-rim Aug 21, 2025
24804c7
Merge pull request #58 from WE-EMS/develop
rimit-rim Aug 25, 2025
8b85e67
Merge pull request #63 from WE-EMS/develop
rimit-rim Aug 27, 2025
2eb4e21
Merge pull request #67 from WE-EMS/develop
rimit-rim Sep 1, 2025
78e2faa
Merge pull request #71 from WE-EMS/develop
rimit-rim Sep 2, 2025
3063e51
Merge pull request #74 from WE-EMS/develop
rimit-rim Sep 2, 2025
141fb7b
Merge pull request #77 from WE-EMS/develop
rimit-rim Sep 6, 2025
fb52e90
🐛Fix: 시간 오차
rimit-rim Sep 7, 2025
3dd452a
Merge pull request #79 from WE-EMS/fix/time
rimit-rim Sep 7, 2025
a0f2813
🐛Fix: 시간 오차 (2)
rimit-rim Sep 7, 2025
17cb604
Merge pull request #80 from WE-EMS/fix/time
rimit-rim Sep 7, 2025
43c6123
♻ Refactor: imageUrl 변수 통일
rimit-rim Sep 10, 2025
644545c
:recycle:Refactor: help 응답 데이터 추가
rimit-rim Sep 11, 2025
ae8a73b
:recycle:Refactor: help 응답 데이터 추가 (2)
rimit-rim Sep 11, 2025
ac2229d
:recycle:Refactor: 스웨거 일부 수정
rimit-rim Sep 11, 2025
3699a4e
:recycle:Refactor: 스웨거 일부 수정 (2)
rimit-rim Sep 11, 2025
a4d21e3
Merge pull request #82 from WE-EMS/refactor/response
rimit-rim Sep 11, 2025
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
22 changes: 17 additions & 5 deletions src/applications/applications.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,14 @@ export class ApplicationsController {
* help:
* id: 6
* helpType: 4
* helpTypeText: "기타"
* helpTypeText: "기타 돌봄"
* status: 0
* statusText: "요청"
* serviceDate: "2025-08-20T00:00:00.000Z"
* startTime: "1970-01-01T01:30:00.000Z"
* endTime: "1970-01-01T03:00:00.000Z"
* addressText: "서울시 동대문구 한교동"
* rewardTokens: 9
* totalApplicants: 0
* applicants: []
* pagination:
Expand All @@ -219,9 +224,14 @@ export class ApplicationsController {
* help:
* id: 16
* helpType: 1
* helpTypeText: "등하원"
* helpTypeText: "등하원 돌봄"
* status: 0
* statusText: "요청"
* serviceDate: "2025-08-20T00:00:00.000Z"
* startTime: "1970-01-01T01:30:00.000Z"
* endTime: "1970-01-01T03:00:00.000Z"
* addressText: "서울시 동대문구 한교동"
* rewardTokens: 9
* totalApplicants: 1
* applicants:
* - applicationId: 1
Expand All @@ -232,7 +242,7 @@ export class ApplicationsController {
* helper:
* id: 3
* nickname: "염둘"
* profileImageUrl: null
* imageUrl: null
* reviewCount: 2
* ratingAvg: 5
* pagination:
Expand Down Expand Up @@ -598,14 +608,16 @@ export class ApplicationsController {
* help:
* id: 20
* helpType: 1
* helpTypeText: "등하원"
* helpTypeText: "등하원 돌봄"
* serviceDate: "2025-08-20T00:00:00.000Z"
* startTime: "1970-01-01T01:30:00.000Z"
* endTime: "1970-01-01T03:00:00.000Z"
* addressText: "서울시 동대문구 한교동"
* rewardTokens: 9
* requester:
* id: 5
* nickname: "김엄마"
* profileImageUrl: "https://example.com/profile.jpg"
* imageUrl: "https://example.com/profile.jpg"
* reviewCount: 12
* ratingAvg: 4.8
* pagination:
Expand Down
7 changes: 7 additions & 0 deletions src/applications/applications.repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ export class ApplicationsRepository {
requesterId: true,
helpType: true,
status: true,
serviceDate: true,
startTime: true,
endTime: true,
addressText: true,
rewardTokens: true,
},
});
}
Expand Down Expand Up @@ -213,6 +218,8 @@ export class ApplicationsRepository {
serviceDate: true,
startTime: true,
endTime: true,
addressText: true,
rewardTokens: true,
requester: {
select: {
id: true,
Expand Down
15 changes: 11 additions & 4 deletions src/applications/dto/applications.response.dto.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export class ApplyListResponseDto {
helpTypeText: this._helpTypeText(help.helpType),
status: help.status,
statusText: this._helpStatusText(help.status),
serviceDate: help.serviceDate,
startTime: help.startTime,
endTime: help.endTime,
addressText: help.addressText,
rewardTokens: help.rewardTokens,
};

// 전체 지원자 수 (페이지네이션 적용 전 총합)
Expand All @@ -53,7 +58,7 @@ export class ApplyListResponseDto {
}

_helpTypeText(type) {
const map = { 1: "등하원", 2: "놀이", 3: "동행", 4: "기타" };
const map = { 1: "등하원 돌봄", 2: "놀이 돌봄", 3: "동행 돌봄", 4: "기타 돌봄" };
return map[type] ?? "알 수 없음";
}
_helpStatusText(status) {
Expand All @@ -73,7 +78,7 @@ export class ApplicantListItemDto {
this.helper = {
id: app.helper?.id ?? app.userId,
nickname: app.helper?.nickname ?? "알수없음",
profileImageUrl:
imageUrl:
app.helper?.imageUrl || app.helper?.kakaoProfileImageUrl || null,
reviewCount: stats.reviewCount ?? 0,
ratingAvg: stats.ratingAvg ?? 0,
Expand Down Expand Up @@ -101,10 +106,12 @@ export class MyApplicationItemDto {
serviceDate: app.helpRequest.serviceDate,
startTime: app.helpRequest.startTime,
endTime: app.helpRequest.endTime,
addressText: app.helpRequest.addressText,
rewardTokens: app.helpRequest.rewardTokens,
requester: {
id: app.helpRequest.requester.id,
nickname: app.helpRequest.requester.nickname,
profileImageUrl:
imageUrl:
app.helpRequest.requester.imageUrl ||
app.helpRequest.requester.kakaoProfileImageUrl ||
null,
Expand All @@ -120,7 +127,7 @@ export class MyApplicationItemDto {
}

_helpTypeText(type) {
const map = { 1: "등하원", 2: "놀이", 3: "동행", 4: "기타" };
const map = { 1: "등하원 돌봄", 2: "놀이 돌봄", 3: "동행 돌봄", 4: "기타 돌봄" };
return map[type] ?? "알 수 없음";
}
}
4 changes: 2 additions & 2 deletions src/auth/auth.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@ import { AuthResponseDto } from "./dto/auth.response.dto.js";
// 로컬 개발용
const cookieOptsDev = {
httpOnly: true,
secure: false, // http
sameSite: 'Lax', // 같은 PC 포트 간 요청만
secure: true, // http
sameSite: 'None', // 같은 PC 포트 간 요청만
path: '/',
maxAge: 7 * 24 * 60 * 60 * 1000,
};
Expand Down
13 changes: 8 additions & 5 deletions src/helps/dto/helps.request.dto.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,14 @@ export class CreateHelpRequestDto {
if (!this.serviceDate) {
errors.push('서비스 날짜를 선택해주세요.');
} else {
const serviceDate = new Date(this.serviceDate);
const today = new Date();
today.setHours(0, 0, 0, 0);

if (serviceDate < today) {
// KST 기준으로 비교 → utils/time.js에서 헬퍼 불러와 사용
// - toKstDateOnly: DB/입력 날짜를 KST 날짜 객체로 변환
// - getKstStartOfTodayUtc: 오늘 00:00(KST)의 UTC (여기선 단순히 KST '오늘 00:00'을 만들어 비교)
const kstNow = new Date(new Date().toLocaleString("en-US", { timeZone: "Asia/Seoul" }));
kstNow.setHours(0, 0, 0, 0); // 오늘 KST 자정
const serviceDateKst = new Date(new Date(this.serviceDate).toLocaleString("en-US", { timeZone: "Asia/Seoul" }));
serviceDateKst.setHours(0, 0, 0, 0);
if (serviceDateKst < kstNow) {
errors.push('서비스 날짜는 오늘 또는 이후여야 합니다.');
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/helps/dto/helps.response.dto.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export class MyHelpRequestListItemDto {
if (helpRequest.applications && helpRequest.applications.length > 0) {
this.applicants = helpRequest.applications.map(app => ({
helperId: app.userId,
helperImageUrl: app.helper.imageUrl || app.helper.kakaoProfileImageUrl
imageUrl: app.helper.imageUrl || app.helper.kakaoProfileImageUrl
}));
}

Expand Down
46 changes: 23 additions & 23 deletions src/helps/helps.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class HelpsController {
* format: binary
* description: "첨부 이미지 (선택사항)"
* responses:
* 200:
* 201:
* description: 돌봄요청 작성 성공
* content:
* application/json:
Expand Down Expand Up @@ -95,8 +95,8 @@ export class HelpsController {
* type: string
* example: "서비스 날짜는 오늘 또는 이후여야 합니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand All @@ -120,8 +120,8 @@ export class HelpsController {
* type: string
* example: "로그인이 필요합니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand All @@ -145,8 +145,8 @@ export class HelpsController {
* type: string
* example: "돌봄요청 생성 중 오류가 발생했습니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand Down Expand Up @@ -301,8 +301,8 @@ export class HelpsController {
* type: string
* example: "로그인이 필요합니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand All @@ -326,8 +326,8 @@ export class HelpsController {
* type: string
* example: "해당 돌봄요청을 찾을 수 없습니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand Down Expand Up @@ -451,8 +451,8 @@ export class HelpsController {
* type: string
* example: "서비스 날짜는 오늘 또는 이후여야 합니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand All @@ -476,8 +476,8 @@ export class HelpsController {
* type: string
* example: "로그인이 필요합니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand All @@ -501,8 +501,8 @@ export class HelpsController {
* type: string
* example: "자신의 돌봄요청만 수정할 수 있습니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand All @@ -526,8 +526,8 @@ export class HelpsController {
* type: string
* example: "해당 돌봄요청을 찾을 수 없습니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand All @@ -551,8 +551,8 @@ export class HelpsController {
* type: string
* example: "돌봄요청 수정 중 오류가 발생했습니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand Down Expand Up @@ -644,8 +644,8 @@ export class HelpsController {
* type: string
* example: "완료된 돌봄요청은 삭제할 수 없습니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand All @@ -669,8 +669,8 @@ export class HelpsController {
* type: string
* example: "로그인이 필요합니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand All @@ -694,8 +694,8 @@ export class HelpsController {
* type: string
* example: "자신의 돌봄요청만 삭제할 수 있습니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand All @@ -719,8 +719,8 @@ export class HelpsController {
* type: string
* example: "해당 돌봄요청을 찾을 수 없습니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand All @@ -744,8 +744,8 @@ export class HelpsController {
* type: string
* example: "돌봄요청 삭제 중 오류가 발생했습니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand Down Expand Up @@ -794,7 +794,7 @@ export class HelpsController {
* schema:
* type: integer
* enum: [0, 1, 2]
* description: "매칭 상태 (0: 요청, 1: 배정, 2: 완료, 4: 모집종료)"
* description: "매칭 상태 (0: 요청, 1: 배정, 2: 완료)"
* - in: query
* name: helpTypes
* schema:
Expand Down Expand Up @@ -873,8 +873,8 @@ export class HelpsController {
* type: string
* example: "돌봄요청 조회 중 오류가 발생했습니다."
* data:
* type: object
* example: {}
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand Down Expand Up @@ -999,7 +999,7 @@ export class HelpsController {
* helperId:
* type: integer
* example: 5
* helperImageUrl:
* imageUrl:
* type: string
* example: "https://example.com/helper1.jpg"
* assignedHelper:
Expand Down Expand Up @@ -1047,8 +1047,8 @@ export class HelpsController {
* type: string
* example: "로그인이 필요합니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand All @@ -1072,8 +1072,8 @@ export class HelpsController {
* type: string
* example: "내 돌봄요청 조회 중 오류가 발생했습니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand Down Expand Up @@ -1215,8 +1215,8 @@ export class HelpsController {
* type: string
* example: "로그인이 필요합니다."
* data:
* type: object
* nullable: true
* example: null
* success:
* nullable: true
* example: null
Expand Down
Loading