Skip to content

Commit

Permalink
ETC : 원상복구
Browse files Browse the repository at this point in the history
  • Loading branch information
jiminChoi committed Dec 26, 2024
1 parent 165d9f3 commit f13d3c2
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 15 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,20 +154,26 @@

<div align="center">

| [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) |
| [🐇dongglee](https://github.com/leedonggyu1848) | [🍑 eunbikim](https://github.com/eunbi9n) | [🥔 gyuwlee](https://github.com/gyutato) | [🐬huchoi](https://github.com/hunjin-choi) | [👻 hybae](https://github.com/HyeonsikBae) |
| ----------------------------------------------- | ----------------------------------------- | ---------------------------------------- | ------------------------------------------ | ------------------------------------------ |

| [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) |
| [🍒 hyoon](https://github.com/kamg2218) | [🍏 hyospark](https://github.com/kyoshong) | [🙉 inshin](https://github.com/42inshin) | [🧑‍✈️ jaesjeon](https://github.com/Oris482) | [🐶 jiwchoi](https://github.com/jiwon-choi) |
| --------------------------------------- | ------------------------------------------ | ---------------------------------------- | ----------------------------------------- | ------------------------------------------- |

| [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) |[🚀sanan](https://github.com/Ssuamje) |
| [🐯 joopark](https://github.com/joohongpark) | [🚀sanan](https://github.com/Ssuamje) | [🐻 seuan](https://github.com/aseungbo) | [🤑seycho](https://github.com/SeyoungCho) | [😺 sichoi](https://github.com/sichoi42) |
| -------------------------------------------- | ------------------------------------- | --------------------------------------- | ----------------------------------------- | ---------------------------------------- |

| [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) |
| [🍎 skim](https://github.com/subin195-09) | [🍪 spark](https://github.com/Hyunja27) | [✏️yooh](https://github.com/oyhoyhk) | [🪀 yoyoo](https://github.com/Yoowatney) | [🎒 yubchoi](https://github.com/yubinquitous) |
| ----------------------------------------- | --------------------------------------- | ------------------------------------ | ---------------------------------------- | --------------------------------------------- |

| [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) | [🚀sanan](https://github.com/Ssuamje) |
| --------------------------------------------- | ---------------------------------------------- | -------------------------------------- | --------------------------------------------- | --------------------------------------------- | -------------------------------------- |
| [ 🌑 daewoole](https://github.com/LeeDaeWook) | [🐝 hyungnoh](https://github.com/YESHYUNGSEOK) | [🐻‍❄️ jpark2](https://github.com/Z1park) | [🎨 jusohn](https://github.com/junyoung2015) | [🤓 seonghmo ](https://github.com/seong-hui) | [🚀 wchae](https://github.com/enaenen) |
| --------------------------------------------- | ---------------------------------------------- | -------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------- |

| [ 🐶 surlee](https://github.com/Elineely) | [ 🐣 hyowchoi](https://github.com/chyo1/) | [ 👽 sohyupar](https://github.com/saewoo1) | [🦝 jimchoi](https://github.com/jimchoi9) | [ 🛼 jeekim](https://github.com/jnkeniaem) | [🍾 miyu](https://github.com/Minkyu01) | [🧸 gykoh](https://github.com/gykoh42) |
| ----------------------------------------- | ----------------------------------------- | ------------------------------------------ | ----------------------------------------- | ------------------------------------------ | -------------------------------------- | -------------------------------------- |

| [ 🐰 jihykim2](https://github.com/jihyunk03) | [⛄️ seonmiki](https://github.com/seonmiki) | [ 🎱 junsbae ](https://github.com/wet6123) |
| -------------------------------------------- | ------------------------------------------- | ------------------------------------------ |

| <a href="https://github.com/innovationacademy-kr"><img src="https://img.shields.io/badge/42Seoul-000000?style=flat-square&logo=42&logoColor=white" /></a> |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,13 @@ public void writeMemo(String memo) {

@Override
public boolean equals(final Object other) {
return true;
if (this == other) {
return true;
}
if (!(other instanceof Cabinet)) {
return false;
}
return this.cabinetId.equals(((Cabinet) other).cabinetId);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,25 @@ public class LentServiceImpl implements LentService {
@Override
public void startLentCabinet(Long userId, Long cabinetId) {
log.info("Called startLentCabinet: {}, {}", userId, cabinetId);
lentRepository.deleteAll();
LocalDateTime now = LocalDateTime.now();
Cabinet cabinet = cabinetOptionalFetcher.getCabinetForUpdate(cabinetId);
User user = userOptionalFetcher.getUser(userId);
int userActiveLentCount = lentRepository.countUserActiveLent(userId);
List<BanHistory> userActiveBanList = banHistoryRepository.findUserActiveBanList(userId,
now);
// 대여 가능한 유저인지 확인
lentPolicy.handlePolicyStatus(
lentPolicy.verifyUserForLent(user, cabinet, userActiveLentCount, userActiveBanList),
userActiveBanList);
// 대여 가능한 캐비넷인지 확인
lentPolicy.handlePolicyStatus(lentPolicy.verifyCabinetForLent(cabinet), userActiveBanList);
// 캐비넷 상태 변경
cabinet.specifyStatus(CabinetStatus.FULL);
// 만료 시간 적용
LocalDateTime expiredAt = lentPolicy.generateExpirationDate(now, cabinet);
LentHistory lentHistory = LentHistory.of(now, expiredAt, userId, cabinetId);
lentPolicy.applyExpirationDate(lentHistory, expiredAt);
lentRepository.save(lentHistory);
}

@Override
Expand Down
2 changes: 0 additions & 2 deletions backend/src/main/resources/cabi_secret.key

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
/>
<meta
property="og:description"
content="아 그냥 들고 다녀~"
content="42서울 캐비닛 서비스: 여러분의 일상을 가볍게"
/>
<meta property="og:site_name" content="Cabi" />
<meta property="og:locale" content="ko_KR" />
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ function App(): React.ReactElement {
<Route path="profile" element={<ProfilePage />} />
<Route path="pending" element={<PendingPage />} />
</Route>
제가 만약 이런 곳에다가
{/* admin용 라우터 */}
이렇게 냅다 글을 쓰면 어떨 것 같으세요?
지코바보
<Route path="/admin/" element={<AdminLayout />}>
<Route path="login" element={<AdminLoginPage />} />
<Route path="home" element={<AdminHomePage />} />
Expand Down
1 change: 0 additions & 1 deletion time_bomb.sh

This file was deleted.

0 comments on commit f13d3c2

Please sign in to comment.