Skip to content

Commit 04f6161

Browse files
committed
feat(lending): 사서의 대출 제한 권수 4권으로 조정 (#826)
* feat(lending): 사서의 대출 제한 권수 4권으로 조정 * style(lending): prettier 재적용
1 parent d49f9a4 commit 04f6161

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

backend/src/v1/lendings/lendings.service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ export const create = async (
3636
0,
3737
0,
3838
);
39-
if (numberOfLendings >= 2) {
39+
// 사서는 4권, 일반 사용자는 2권까지 대출 가능
40+
if (
41+
(users[0].role === 2 && numberOfLendings >= 4) ||
42+
(users[0].role !== 2 && numberOfLendings >= 2)
43+
) {
4044
throw new Error(errorCode.LENDING_OVERLOAD);
4145
}
4246
const penaltyEndDate = await lendingRepo.getUsersPenalty(userId);

0 commit comments

Comments
 (0)