Skip to content

Commit

Permalink
remove the debug stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
killua-eu committed Aug 27, 2023
1 parent 62c3d9f commit 58b7d04
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions glued/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ public function users_c1(Request $request, Response $response, array $args = [])
{
$rp = $request->getQueryParams();
// required params

foreach (['handle', 'email', 'sub'] as $key) {
if (!array_key_exists($key, $rp)) { throw new \Exception($key . ' is required.'); }
if ($rp[$key] == '') { throw new \Exception($key . ' must not be empty.'); }
Expand All @@ -358,12 +359,7 @@ public function users_c1(Request $request, Response $response, array $args = [])
}
// whitelist
foreach (['handle', 'email', 'sub'] as $key) { $payload[$key] = $rp[$key]; }
try {
$res = $this->auth->adduser($payload);
} catch (\Exception $e) {
echo $this->db->getLastQuery();
print_r($e);
}
$res = $this->auth->adduser($payload);
return $response->withJson($res);
}

Expand Down

0 comments on commit 58b7d04

Please sign in to comment.