Merge pull request #2734 from pixelfed/staging

Update ApiV1Controller, add missing instance api attributes
This commit is contained in:
daniel 2021-04-22 22:47:40 -06:00 committed by GitHub
commit a2b8b1d799
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 57 additions and 51 deletions

View file

@ -66,6 +66,7 @@
- Updated admin instance page, add search and improve performance. ([f5829373](https://github.com/pixelfed/pixelfed/commit/f5829373)) - Updated admin instance page, add search and improve performance. ([f5829373](https://github.com/pixelfed/pixelfed/commit/f5829373))
- Updated AdminInstanceController, invalidate banned domain cache when updated. ([35393edf](https://github.com/pixelfed/pixelfed/commit/35393edf)) - Updated AdminInstanceController, invalidate banned domain cache when updated. ([35393edf](https://github.com/pixelfed/pixelfed/commit/35393edf))
- Updated AP Helpers, use instance filtering. ([66b4f8c7](https://github.com/pixelfed/pixelfed/commit/66b4f8c7)) - Updated AP Helpers, use instance filtering. ([66b4f8c7](https://github.com/pixelfed/pixelfed/commit/66b4f8c7))
- Updated ApiV1Controller, add missing instance api attributes. ([64b86546](https://github.com/pixelfed/pixelfed/commit/64b86546))
- ([](https://github.com/pixelfed/pixelfed/commit/)) - ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.10.10 (2021-01-28)](https://github.com/pixelfed/pixelfed/compare/v0.10.9...v0.10.10) ## [v0.10.10 (2021-01-28)](https://github.com/pixelfed/pixelfed/compare/v0.10.9...v0.10.10)

View file

@ -958,8 +958,13 @@ class ApiV1Controller extends Controller
public function instance(Request $request) public function instance(Request $request)
{ {
$res = [ $res = [
'approval_required' => false,
'contact_account' => null,
'description' => 'Pixelfed - Photo sharing for everyone', 'description' => 'Pixelfed - Photo sharing for everyone',
'email' => config('instance.email'), 'email' => config('instance.email'),
'invites_enabled' => false,
'rules' => [],
'short_description' => 'Pixelfed - Photo sharing for everyone',
'languages' => ['en'], 'languages' => ['en'],
'max_toot_chars' => (int) config('pixelfed.max_caption_length'), 'max_toot_chars' => (int) config('pixelfed.max_caption_length'),
'registrations' => config('pixelfed.open_registration'), 'registrations' => config('pixelfed.open_registration'),
@ -969,8 +974,8 @@ class ApiV1Controller extends Controller
'domain_count' => 0 'domain_count' => 0
], ],
'thumbnail' => config('app.url') . '/img/pixelfed-icon-color.png', 'thumbnail' => config('app.url') . '/img/pixelfed-icon-color.png',
'title' => 'Pixelfed (' . config('pixelfed.domain.app') . ')', 'title' => config('app.name'),
'uri' => config('app.url'), 'uri' => config('pixelfed.domain.app'),
'urls' => [], 'urls' => [],
'version' => '2.7.2 (compatible; Pixelfed ' . config('pixelfed.version') . ')', 'version' => '2.7.2 (compatible; Pixelfed ' . config('pixelfed.version') . ')',
'environment' => [ 'environment' => [
@ -983,7 +988,7 @@ class ApiV1Controller extends Controller
] ]
]; ];
return response()->json($res, 200, [], JSON_PRETTY_PRINT); return response()->json($res);
} }
/** /**