bug fix: enhance list param error
This commit is contained in:
parent
dce75b563b
commit
156a4fc245
@ -74,12 +74,12 @@ class BoxController extends BaseController {
|
|||||||
if (chestid && !isObjectIdString(chestid)) {
|
if (chestid && !isObjectIdString(chestid)) {
|
||||||
throw new ZError(11, 'invalid chest id')
|
throw new ZError(11, 'invalid chest id')
|
||||||
}
|
}
|
||||||
if (!code && !chestId) {
|
if (!code && !chestid) {
|
||||||
throw new ZError(11, 'must provide share code or chest id')
|
throw new ZError(11, 'must provide share code or chest id')
|
||||||
}
|
}
|
||||||
let chest: any
|
let chest: any
|
||||||
if (chestId) {
|
if (chestid) {
|
||||||
chest = await ActivityChest.findById(chestId)
|
chest = await ActivityChest.findById(chestid)
|
||||||
} else {
|
} else {
|
||||||
chest = await ActivityChest.findOne({ shareCode: code })
|
chest = await ActivityChest.findOne({ shareCode: code })
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user