issue fix
This commit is contained in:
parent
1fa8c4cfd2
commit
c4cc7feb0a
@ -399,6 +399,10 @@ class AuthController extends ResourceController
|
||||
// Generate JWT Token
|
||||
$token = generateJWT($user);
|
||||
|
||||
// Store the token in DB for current session
|
||||
$this->userModel->update($user['user_id'], [
|
||||
'current_token' => $token
|
||||
]);
|
||||
|
||||
return $this->respond([
|
||||
'status' => 200,
|
||||
|
||||
@ -532,6 +532,16 @@ class PlanController extends ResourceController
|
||||
return $this->respond(['status' => 'success', 'plan_id' => $planId]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
|
||||
// Log detailed error
|
||||
log_message('error', sprintf("%s Exception caught in %s (line %d): %s\nTrace:\n%s",
|
||||
'createOrUpdatePlan - ',
|
||||
$e->getFile(),
|
||||
$e->getLine(),
|
||||
$e->getMessage(),
|
||||
$e->getTraceAsString()
|
||||
));
|
||||
|
||||
return $this->failServerError('Failed to create : ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user