Skip to content

Commit

Permalink
[#80] 활동 기수와 활동 파트 추출 시, 중복되는 코드 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
yeseul106 authored and rdd9223 committed Oct 28, 2023
1 parent 4619938 commit c237727
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions server/src/meeting/v1/meeting-v1.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ export class MeetingV1Service {
const csvData = applyList[0].map((apply) => {
const { user, appliedDate, content } = apply;
const { name, activities, phone } = user;
const recentActiveGeneration = activities
?.map((activity) => activity.generation)
.sort((a, b) => b - a)[0];
const recentActivePart = activities

const recentActive = activities
?.slice()
.sort((a, b) => b.generation - a.generation)
.map((activity) => activity.part)[0];
.sort((a, b) => b.generation - a.generation)[0];
const recentActiveGeneration = recentActive.generation;
const recentActivePart = recentActive.part;

const formattedAppliedDate = dayjs(appliedDate).format(
'YYYY-MM-DD HH:mm:ss',
);
Expand Down

0 comments on commit c237727

Please sign in to comment.