添加供应商已存在显示报错存在
This commit is contained in:
parent
22a236d7fb
commit
2711ac1719
@ -81,6 +81,8 @@ export default router.post(
|
||||
}
|
||||
|
||||
if ((vendor.id as string).includes(":")) return res.status(400).send(error("id不能包含英文冒号"));
|
||||
const data = await u.db("o_vendorConfig").where("id", vendor.id).first();
|
||||
if (data) return res.status(500).send(error("供应商id已存在"));
|
||||
await u.db("o_vendorConfig").insert({
|
||||
id: vendor.id,
|
||||
author: vendor.author,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user