more code fixes

This commit is contained in:
Dennis Eichhorn 2024-03-15 21:57:48 +00:00
parent 7808452b02
commit 79b4607938
3 changed files with 6 additions and 6 deletions

View File

@ -71,7 +71,7 @@ final class ApiAttributeController extends Controller
->with('type') ->with('type')
->where('type/id', $type->id) ->where('type/id', $type->id)
->where('ref', (int) $request->getData('ref')) ->where('ref', (int) $request->getData('ref'))
->execute(); ->executeCount();
if ($attr > 0) { if ($attr > 0) {
$response->header->status = RequestStatusCode::R_409; $response->header->status = RequestStatusCode::R_409;

View File

@ -229,7 +229,7 @@ final class ApiController extends Controller
$profile = ProfileMapper::count() $profile = ProfileMapper::count()
->where('account', $rel->relation->id) ->where('account', $rel->relation->id)
->execute(); ->executeCount();
if ($profile < 1) { if ($profile < 1) {
continue; continue;
@ -267,7 +267,7 @@ final class ApiController extends Controller
$profile = ProfileMapper::count() $profile = ProfileMapper::count()
->where('account', $account->id) ->where('account', $account->id)
->execute(); ->executeCount();
if ($profile < 1) { if ($profile < 1) {
continue; continue;

View File

@ -184,13 +184,13 @@ final class BackendController extends Controller implements DashboardElementInte
if ($request->getData('ptype') === 'p') { if ($request->getData('ptype') === 'p') {
$view->data['tasks'] = $mapperQuery->where('id', $request->getDataInt('id') ?? 0, '<') $view->data['tasks'] = $mapperQuery->where('id', $request->getDataInt('id') ?? 0, '<')
->execute(); ->executeGetAll();
} elseif ($request->getData('ptype') === 'n') { } elseif ($request->getData('ptype') === 'n') {
$view->data['tasks'] = $mapperQuery->where('id', $request->getDataInt('id') ?? 0, '>') $view->data['tasks'] = $mapperQuery->where('id', $request->getDataInt('id') ?? 0, '>')
->execute(); ->executeGetAll();
} else { } else {
$view->data['tasks'] = $mapperQuery->where('id', 0, '>') $view->data['tasks'] = $mapperQuery->where('id', 0, '>')
->execute(); ->executeGetAll();
} }
$view->data['task_media'] = []; $view->data['task_media'] = [];