1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 08:14:10 +00:00

Update api routes, add post method support to /api/v1/accounts/update_credentials to properly handle binary form data (avatars)

This commit is contained in:
Daniel Supernault 2023-03-25 05:12:54 -06:00
parent 558700fc0a
commit 1ae19ea571
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -26,7 +26,7 @@ Route::group(['prefix' => 'api'], function() use($middleware) {
Route::get('bookmarks', 'Api\ApiV1Controller@bookmarks')->middleware($middleware); Route::get('bookmarks', 'Api\ApiV1Controller@bookmarks')->middleware($middleware);
Route::get('accounts/verify_credentials', 'Api\ApiV1Controller@verifyCredentials')->middleware($middleware); Route::get('accounts/verify_credentials', 'Api\ApiV1Controller@verifyCredentials')->middleware($middleware);
Route::patch('accounts/update_credentials', 'Api\ApiV1Controller@accountUpdateCredentials')->middleware($middleware); Route::match(['post', 'patch'], 'accounts/update_credentials', 'Api\ApiV1Controller@accountUpdateCredentials')->middleware($middleware);
Route::get('accounts/relationships', 'Api\ApiV1Controller@accountRelationshipsById')->middleware($middleware); Route::get('accounts/relationships', 'Api\ApiV1Controller@accountRelationshipsById')->middleware($middleware);
Route::get('accounts/search', 'Api\ApiV1Controller@accountSearch')->middleware($middleware); Route::get('accounts/search', 'Api\ApiV1Controller@accountSearch')->middleware($middleware);
Route::get('accounts/{id}/statuses', 'Api\ApiV1Controller@accountStatusesById')->middleware($middleware); Route::get('accounts/{id}/statuses', 'Api\ApiV1Controller@accountStatusesById')->middleware($middleware);