diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b739cd4f..2272b30a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ - Update ApiV1Controller, add support for notification filter types ([f61159a1](https://github.com/pixelfed/pixelfed/commit/f61159a1)) - Update ApiV1Dot1Controller, fix mutual api ([a8bb97b2](https://github.com/pixelfed/pixelfed/commit/a8bb97b2)) - Update ApiV1Controller, fix /api/v1/favourits pagination ([72f68160](https://github.com/pixelfed/pixelfed/commit/72f68160)) +- Update RegisterController, update username constraints, require atleast one alpha char ([dd6e3cc2](https://github.com/pixelfed/pixelfed/commit/dd6e3cc2)) +- Update AdminUser, fix entity casting ([cb5620d4](https://github.com/pixelfed/pixelfed/commit/cb5620d4)) +- ([](https://github.com/pixelfed/pixelfed/commit/)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.12.3 (2024-07-01)](https://github.com/pixelfed/pixelfed/compare/v0.12.2...v0.12.3) diff --git a/app/Http/Resources/AdminUser.php b/app/Http/Resources/AdminUser.php index 75bac9f62..390c5c00e 100644 --- a/app/Http/Resources/AdminUser.php +++ b/app/Http/Resources/AdminUser.php @@ -2,8 +2,8 @@ namespace App\Http\Resources; -use Illuminate\Http\Resources\Json\JsonResource; use App\Services\AccountService; +use Illuminate\Http\Resources\Json\JsonResource; class AdminUser extends JsonResource { @@ -18,8 +18,8 @@ class AdminUser extends JsonResource $account = AccountService::get($this->profile_id, true); $res = [ - 'id' => $this->id, - 'profile_id' => $this->profile_id, + 'id' => (string) $this->id, + 'profile_id' => (string) $this->profile_id, 'name' => $this->name, 'username' => $this->username, 'is_admin' => (bool) $this->is_admin, @@ -28,17 +28,18 @@ class AdminUser extends JsonResource 'two_factor_enabled' => (bool) $this->{'2fa_enabled'}, 'register_source' => $this->register_source, 'app_register_ip' => $this->app_register_ip, + 'has_interstitial' => (bool) $this->has_interstitial, 'last_active_at' => $this->last_active_at, 'created_at' => $this->created_at, ]; - if($account) { + if ($account) { $res['avatar'] = $account['avatar']; $res['bio'] = $account['note_text']; - $res['statuses_count'] = $account['statuses_count']; - $res['following_count'] = $account['following_count']; - $res['followers_count'] = $account['followers_count']; - $res['is_private'] = $account['locked']; + $res['statuses_count'] = (int) $account['statuses_count']; + $res['following_count'] = (int) $account['following_count']; + $res['followers_count'] = (int) $account['followers_count']; + $res['is_private'] = (bool) $account['locked']; } return $res; diff --git a/package-lock.json b/package-lock.json index dd68799b3..27289344f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "caniuse-lite": "^1.0.30001418", "chart.js": "^2.7.2", "filesize": "^3.6.1", - "hls.js": "^1.1.5", + "hls.js": "^1.5.13", "howler": "^2.2.0", "infinite-scroll": "^3.0.6", "jquery-scroll-lock": "^3.1.3", @@ -5355,9 +5355,9 @@ } }, "node_modules/hls.js": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.5.7.tgz", - "integrity": "sha512-Hnyf7ojTBtXHeOW1/t6wCBJSiK1WpoKF9yg7juxldDx8u3iswrkPt2wbOA/1NiwU4j27DSIVoIEJRAhcdMef/A==" + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.5.13.tgz", + "integrity": "sha512-xRgKo84nsC7clEvSfIdgn/Tc0NOT+d7vdiL/wvkLO+0k0juc26NRBPPG1SfB8pd5bHXIjMW/F5VM8VYYkOYYdw==" }, "node_modules/hmac-drbg": { "version": "1.0.1", diff --git a/package.json b/package.json index 8ecb08ae7..0fced8c08 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "caniuse-lite": "^1.0.30001418", "chart.js": "^2.7.2", "filesize": "^3.6.1", - "hls.js": "^1.1.5", + "hls.js": "^1.5.13", "howler": "^2.2.0", "infinite-scroll": "^3.0.6", "jquery-scroll-lock": "^3.1.3",