added tests, bug fixes and cleanup

This commit is contained in:
2023-03-13 16:03:32 +10:00
parent 44b123307a
commit 2cea90c2c8
21 changed files with 443 additions and 40 deletions

View File

@@ -56,6 +56,7 @@ class UserController extends ApiController
return $this->respondAsResource(
$collection,
true,
['total' => $total]
);
}
@@ -70,7 +71,7 @@ class UserController extends ApiController
{
if (UserConductor::creatable() === true) {
$user = User::create($request->all());
return $this->respondAsResource(UserConductor::model($request, $user), [], HttpResponseCodes::HTTP_CREATED);
return $this->respondAsResource(UserConductor::model($request, $user), false, [], HttpResponseCodes::HTTP_CREATED);
} else {
return $this->respondForbidden();
}