押金不是必填
This commit is contained in:
parent
63cab98758
commit
f912a0373d
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue