id() ?? 0); if ($userId <= 0) { return $this->error('Unauthorized.', Response::HTTP_UNAUTHORIZED); } $prefs = $this->styleService->update($userId, $request->validated()); return $this->success([ 'preferences' => new UiStyleResource($prefs), ], 'Style updated.'); } }