Skip to content

Commit

Permalink
fix: 스타복싱 시설 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
leemhoon00 committed Nov 16, 2024
1 parent fe8a256 commit 606407d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/facility/facility.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export class FacilityService {
const data = (await response.json()) as FacilityResponse;
const items = data.response.body.items.item;

const facilities = items.map((item) => {
const facilities = [];

for (const item of items) {
if (item.city_cd === '45') {
item.city_cd = '52';
if (item.local_cd.substring(0, 2) === '45') {
Expand All @@ -52,7 +54,11 @@ export class FacilityService {
}
}

return {
if (item.brno === '2249423200') {
continue;
}

facilities.push({
businessId: item.brno,
serialNumber: item.facil_sn,
owner: item.pres_nm,
Expand All @@ -64,8 +70,8 @@ export class FacilityService {
phone: item.res_telno || null,
address: item.road_addr,
detailAddress: item.faci_daddr || null,
};
});
});
}
await this.prisma.facility.createMany({
data: facilities,
});
Expand Down

0 comments on commit 606407d

Please sign in to comment.