押金不是必填

This commit is contained in:
wangxiaoxian 2026-03-03 16:08:08 +08:00
parent 63cab98758
commit f912a0373d
1 changed files with 0 additions and 3 deletions

View File

@ -195,9 +195,6 @@ const createRental = async (req, res) => {
if (!body.rent) { if (!body.rent) {
return res.status(400).json({ error: '缺少租金' }); return res.status(400).json({ error: '缺少租金' });
} }
if (!body.deposit) {
return res.status(400).json({ error: '缺少押金' });
}
// 转换roomId为整数类型 // 转换roomId为整数类型
const parsedRoomId = parseInt(body.roomId); const parsedRoomId = parseInt(body.roomId);