more fixes
This commit is contained in:
@@ -31,11 +31,15 @@ class AvatarController extends Controller
|
||||
$file = $request->file('avatar');
|
||||
|
||||
try {
|
||||
$hash = $this->service->storeFromUploadedFile($user->id, $file);
|
||||
$hash = $this->service->storeFromUploadedFile(
|
||||
(int) $user->id,
|
||||
$file,
|
||||
(string) $request->input('avatar_position', 'center')
|
||||
);
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'hash' => $hash,
|
||||
'url' => AvatarUrl::forUser((int) $user->id, $hash, 128),
|
||||
'url' => AvatarUrl::forUser((int) $user->id, $hash, 256),
|
||||
], 200);
|
||||
} catch (RuntimeException $e) {
|
||||
logger()->warning('Avatar upload validation failed', [
|
||||
|
||||
Reference in New Issue
Block a user