mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update api routes, fixes #2114
This commit is contained in:
parent
a0c0c84d3d
commit
50bbeddd14
1 changed files with 17 additions and 15 deletions
|
@ -7,6 +7,7 @@ $middleware = ['auth:api','twofactor','validemail','localization'];
|
||||||
Route::post('/users/{username}/inbox', 'FederationController@userInbox');
|
Route::post('/users/{username}/inbox', 'FederationController@userInbox');
|
||||||
|
|
||||||
Route::group(['prefix' => 'api'], function() use($middleware) {
|
Route::group(['prefix' => 'api'], function() use($middleware) {
|
||||||
|
|
||||||
Route::group(['prefix' => 'v1'], function() use($middleware) {
|
Route::group(['prefix' => 'v1'], function() use($middleware) {
|
||||||
Route::post('apps', 'Api\ApiV1Controller@apps');
|
Route::post('apps', 'Api\ApiV1Controller@apps');
|
||||||
Route::get('instance', 'Api\ApiV1Controller@instance');
|
Route::get('instance', 'Api\ApiV1Controller@instance');
|
||||||
|
@ -28,7 +29,7 @@ Route::group(['prefix' => 'api'], function() use($middleware) {
|
||||||
Route::post('accounts/{id}/unmute', 'Api\ApiV1Controller@accountUnmuteById')->middleware($middleware);
|
Route::post('accounts/{id}/unmute', 'Api\ApiV1Controller@accountUnmuteById')->middleware($middleware);
|
||||||
Route::get('accounts/{id}/lists', 'Api\ApiV1Controller@accountListsById')->middleware($middleware);
|
Route::get('accounts/{id}/lists', 'Api\ApiV1Controller@accountListsById')->middleware($middleware);
|
||||||
Route::get('lists/{id}/accounts', 'Api\ApiV1Controller@accountListsById')->middleware($middleware);
|
Route::get('lists/{id}/accounts', 'Api\ApiV1Controller@accountListsById')->middleware($middleware);
|
||||||
Route::get('accounts/{id}', 'Api\ApiV1Controller@accountById')->middleware($middleware);
|
Route::get('accounts/{id}', 'Api\ApiV1Controller@accountById');
|
||||||
|
|
||||||
Route::post('avatar/update', 'ApiController@avatarUpdate')->middleware($middleware);
|
Route::post('avatar/update', 'ApiController@avatarUpdate')->middleware($middleware);
|
||||||
Route::get('blocks', 'Api\ApiV1Controller@accountBlocks')->middleware($middleware);
|
Route::get('blocks', 'Api\ApiV1Controller@accountBlocks')->middleware($middleware);
|
||||||
|
@ -67,18 +68,19 @@ Route::group(['prefix' => 'api'], function() use($middleware) {
|
||||||
Route::get('timelines/public', 'Api\ApiV1Controller@timelinePublic');
|
Route::get('timelines/public', 'Api\ApiV1Controller@timelinePublic');
|
||||||
Route::get('timelines/tag/{hashtag}', 'Api\ApiV1Controller@timelineHashtag')->middleware($middleware);
|
Route::get('timelines/tag/{hashtag}', 'Api\ApiV1Controller@timelineHashtag')->middleware($middleware);
|
||||||
});
|
});
|
||||||
Route::group(['prefix' => 'stories'], function () use($middleware) {
|
Route::group(['prefix' => 'stories'], function () use($middleware) {
|
||||||
Route::get('v1/me', 'StoryController@apiV1Me');
|
Route::get('v1/me', 'StoryController@apiV1Me');
|
||||||
Route::get('v1/recent', 'StoryController@apiV1Recent');
|
Route::get('v1/recent', 'StoryController@apiV1Recent');
|
||||||
Route::post('v1/add', 'StoryController@apiV1Add')->middleware(array_merge($middleware, ['throttle:maxStoriesPerDay,1440']));
|
Route::post('v1/add', 'StoryController@apiV1Add')->middleware(array_merge($middleware, ['throttle:maxStoriesPerDay,1440']));
|
||||||
Route::get('v1/item/{id}', 'StoryController@apiV1Item');
|
Route::get('v1/item/{id}', 'StoryController@apiV1Item');
|
||||||
Route::get('v1/fetch/{id}', 'StoryController@apiV1Fetch');
|
Route::get('v1/fetch/{id}', 'StoryController@apiV1Fetch');
|
||||||
Route::get('v1/profile/{id}', 'StoryController@apiV1Profile');
|
Route::get('v1/profile/{id}', 'StoryController@apiV1Profile');
|
||||||
Route::get('v1/exists/{id}', 'StoryController@apiV1Exists');
|
Route::get('v1/exists/{id}', 'StoryController@apiV1Exists');
|
||||||
Route::delete('v1/delete/{id}', 'StoryController@apiV1Delete')->middleware(array_merge($middleware, ['throttle:maxStoryDeletePerDay,1440']));
|
Route::delete('v1/delete/{id}', 'StoryController@apiV1Delete')->middleware(array_merge($middleware, ['throttle:maxStoryDeletePerDay,1440']));
|
||||||
Route::post('v1/viewed', 'StoryController@apiV1Viewed');
|
Route::post('v1/viewed', 'StoryController@apiV1Viewed');
|
||||||
});
|
});
|
||||||
Route::group(['prefix' => 'v2'], function() use($middleware) {
|
Route::group(['prefix' => 'v2'], function() use($middleware) {
|
||||||
Route::get('search', 'Api\ApiV1Controller@searchV2')->middleware($middleware);
|
Route::get('search', 'Api\ApiV1Controller@searchV2')->middleware($middleware);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue