fix(web): update user team retrieval method for consistent authentication handling
This commit is contained in:
@@ -291,8 +291,8 @@ Route::middleware(['auth'])->group(function () {
|
||||
Route::post('/upload/backup/{databaseUuid}', [UploadController::class, 'upload'])->name('upload.backup');
|
||||
Route::get('/download/backup/{executionId}', function () {
|
||||
try {
|
||||
$team = auth()->user()->currentTeam();
|
||||
$user = auth()->user();
|
||||
$team = $user->currentTeam();
|
||||
if (is_null($team)) {
|
||||
return response()->json(['message' => 'Team not found.'], 404);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user