Enhance get_testing_data response with additional fields as requested_date and null safety
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 9s
Gemini PR Review / review (pull_request) Successful in 1m4s
Laravel Pint / pint (pull_request) Failing after 2m51s
Laravel Larastan / larastan (pull_request) Failing after 6m19s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 9s
Gemini PR Review / review (pull_request) Successful in 1m4s
Laravel Pint / pint (pull_request) Failing after 2m51s
Laravel Larastan / larastan (pull_request) Failing after 6m19s
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Plant;
|
||||
use App\Models\User;
|
||||
//use Carbon\Carbon;
|
||||
use Hash;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -83,10 +84,11 @@ class UserController extends Controller
|
||||
//$user = User::where('email', $email)->first();
|
||||
if (Hash::check($header_pass, $existUser->password)) {
|
||||
return response()->json([
|
||||
'created_at' => $existUser->created_at->format('Y-m-d H:i:s'),
|
||||
'updated_at' => $existUser->updated_at->format('Y-m-d H:i:s'),
|
||||
'plant' => (String)$existPlant,
|
||||
'email' => $existUser->email,
|
||||
'created_at' => $existUser->created_at->format('Y-m-d H:i:s') ?? "",
|
||||
'updated_at' => $existUser->updated_at->format('Y-m-d H:i:s') ?? "",
|
||||
'requested_at' => now()->format('Y-m-d H:i:s') ?? "", //Carbon::now(config('app.timezone'))->format('Y-m-d H:i:s') ?? "",
|
||||
'plant' => (String)$existPlant ?? "",
|
||||
'email' => $existUser->email ?? "",
|
||||
'roles' => $existUser->roles()->pluck('name')->toArray()
|
||||
], 200);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user