chore: durcit la configuration pour la production
- mobile: externalise l'URL d'API via EXPO_PUBLIC_API_URL (repli localhost en dev) - backend: .env.example adapté au projet (PostgreSQL, JWT, FRONTEND_URL, Redis) - frontend/mobile: ajoute .env.example (+ exception gitignore front) - mobile: supprime les 4 `any` (helper getApiError, type Feed, glyphMap Ionicons) - backend: normalise le style PSR-12 via Pint (13 fichiers) Tests backend 15/15, mobile tsc 0, Pint pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\RegisterRequest;
|
||||
use App\Http\Requests\LoginRequest;
|
||||
use App\Models\Utilisateur;
|
||||
use App\Http\Requests\RegisterRequest;
|
||||
use App\Models\Role;
|
||||
use App\Models\Tracker;
|
||||
use App\Models\Utilisateur;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Tymon\JWTAuth\Facades\JWTAuth;
|
||||
|
||||
@@ -44,7 +44,7 @@ class AuthController extends Controller
|
||||
{
|
||||
$credentials = $request->only('email', 'password');
|
||||
|
||||
if (!$token = auth()->attempt($credentials)) {
|
||||
if (! $token = auth()->attempt($credentials)) {
|
||||
return response()->json([
|
||||
'message' => 'Identifiants incorrects',
|
||||
], 401);
|
||||
@@ -52,8 +52,9 @@ class AuthController extends Controller
|
||||
|
||||
$utilisateur = auth()->user();
|
||||
|
||||
if (!$utilisateur->est_actif) {
|
||||
if (! $utilisateur->est_actif) {
|
||||
auth()->logout();
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Votre compte a été désactivé',
|
||||
], 403);
|
||||
|
||||
Reference in New Issue
Block a user