Refactor logging in PushServerUpdateJob, Application, and SentinelSeeder

This commit is contained in:
Andras Bacsai
2024-10-15 17:03:50 +02:00
parent 8c53af088e
commit 2702fbc284
4 changed files with 34 additions and 29 deletions

View File

@@ -148,12 +148,12 @@ Route::group([
return response()->json(['message' => 'Server not found'], 404);
}
if ($server->settings->sentinel_token !== $naked_token) {
logger('Unauthorized');
return response()->json(['message' => 'Unauthorized'], 401);
}
$data = request()->all();
PushServerUpdateJob::dispatch($server, $data);
return response()->json(['message' => 'ok'], 200);
});
});