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)) {
|
||||
throw new ZError(11, 'invalid chest id')
|
||||
}
|
||||
if (!code && !chestId) {
|
||||
if (!code && !chestid) {
|
||||
throw new ZError(11, 'must provide share code or chest id')
|
||||
}
|
||||
let chest: any
|
||||
if (chestId) {
|
||||
chest = await ActivityChest.findById(chestId)
|
||||
if (chestid) {
|
||||
chest = await ActivityChest.findById(chestid)
|
||||
} else {
|
||||
chest = await ActivityChest.findOne({ shareCode: code })
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user