Create getInvalidUser route

This commit is contained in:
T'JAMPENS QUENTIN p2406187
2026-01-05 09:48:13 +01:00
parent 4c907c8ba5
commit 516ab77d58
4 changed files with 18 additions and 2 deletions
+14
View File
@@ -196,4 +196,18 @@ class UserController extends Controller
return response()->json(['message' => "Server error"], 500);
}
}
public function getInvalidUsers(Request $request): JsonResponse {
try {
$users = User::where('validate', 0)->pluck('id');
return response()->json($users);
} catch (\Exception $e) {
Log::info($e->getMessage());
return response()->json(['message' => "Server error"], 500);
}
}
}