This commit is contained in:
Adisak 2025-10-20 18:08:59 +07:00
parent c14de47250
commit 0f22605784

View file

@ -2531,11 +2531,11 @@ export class PositionController extends Controller {
const childValue = nextChildMap[body.type];
if(_data.privilege === 'NORMAL'){
if (Array.isArray(childValue) && childValue.some(item => item != null)) {
return new HttpSuccess({ data: [{}], total: 0 });
return new HttpSuccess({ data: [], total: 0 });
}
}else if(_data.privilege === 'PARENT'){
if (body.type == 0){
return new HttpSuccess({ data: [{}], total: 0 });
return new HttpSuccess({ data: [], total: 0 });
}
} else if (_data.privilege === 'CHILD') {
const higherChildChecks = [
@ -2548,7 +2548,7 @@ export class PositionController extends Controller {
for (const check of higherChildChecks) {
if (Array.isArray(check.child) && check.next == null) {
if (check.type.includes(body.type)) {
return new HttpSuccess({ data: [{}], total: 0 });
return new HttpSuccess({ data: [], total: 0 });
}
}
}