fix billing process

This commit is contained in:
Dennis Eichhorn 2023-04-08 04:36:25 +02:00
parent 2e975e8092
commit 762387db58
4 changed files with 16 additions and 10 deletions

View File

@ -8,9 +8,11 @@ assignees: ''
--- ---
# Bug Description # Bug Description
A clear and concise description of what the bug is. A clear and concise description of what the bug is.
# How to Reproduce # How to Reproduce
Steps to reproduce the behavior: Steps to reproduce the behavior:
1. Go to '...' 1. Go to '...'
@ -19,16 +21,20 @@ Steps to reproduce the behavior:
4. See error 4. See error
# Expected Behavior # Expected Behavior
A clear and concise description of what you expected to happen. A clear and concise description of what you expected to happen.
# Screenshots # Screenshots
If applicable, add screenshots to help explain your problem. If applicable, add screenshots to help explain your problem.
# System Information # System Information
- System: [e.g. PC or iPhone11, ...]
- OS: [e.g. iOS] - System: [e.g. PC or iPhone11, ...]
- Browser [e.g. chrome, safari] - OS: [e.g. iOS]
- KarakaVersion [e.g. 22] - Browser [e.g. chrome, safari]
- KarakaVersion [e.g. 22]
# Additional Information # Additional Information
Add any other context about the problem here. Add any other context about the problem here.

View File

@ -307,8 +307,8 @@ final class ApiController extends Controller
private function validateCommentCreate(RequestAbstract $request) : array private function validateCommentCreate(RequestAbstract $request) : array
{ {
$val = []; $val = [];
if (($val['plain'] = empty($request->getData('plain'))) if (($val['plain'] = !$request->hasData('plain'))
|| ($val['list'] = empty($request->getData('list'))) || ($val['list'] = !$request->hasData('list'))
) { ) {
return $val; return $val;
} }
@ -477,7 +477,7 @@ final class ApiController extends Controller
private function validateCommentVote(RequestAbstract $request) : array private function validateCommentVote(RequestAbstract $request) : array
{ {
$val = []; $val = [];
if (($val['id'] = empty($request->getData('id'))) if (($val['id'] = !$request->hasData('id'))
|| ($val['type'] = ($request->getDataInt('type') < -1 || $request->getDataInt('type') > 1)) || ($val['type'] = ($request->getDataInt('type') < -1 || $request->getDataInt('type') > 1))
) { ) {
return $val; return $val;

View File

@ -109,8 +109,8 @@ final class BackendController extends Controller
private function validateCommentCreate(RequestAbstract $request) : array private function validateCommentCreate(RequestAbstract $request) : array
{ {
$val = []; $val = [];
if (($val['title'] = empty($request->getData('title'))) if (($val['title'] = !$request->hasData('title'))
|| ($val['plain'] = empty($request->getData('plain'))) || ($val['plain'] = !$request->hasData('plain'))
) { ) {
return $val; return $val;
} }

View File

@ -72,7 +72,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
$permission = new AccountPermission(); $permission = new AccountPermission();
$permission->setUnit(1); $permission->setUnit(1);
$permission->setApp('backend'); $permission->setApp(2);
$permission->setPermission( $permission->setPermission(
PermissionType::READ PermissionType::READ
| PermissionType::CREATE | PermissionType::CREATE