Update web routes

This commit is contained in:
Daniel Supernault 2021-09-03 22:26:39 -06:00
parent 6ca140e5cc
commit 2d99434e2b
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 21 additions and 23 deletions

View file

@ -75,17 +75,7 @@ Route::group(['prefix' => 'api'], function() use($middleware) {
Route::get('timelines/public', 'Api\ApiV1Controller@timelinePublic')->middleware($middleware); Route::get('timelines/public', 'Api\ApiV1Controller@timelinePublic')->middleware($middleware);
Route::get('timelines/tag/{hashtag}', 'Api\ApiV1Controller@timelineHashtag'); Route::get('timelines/tag/{hashtag}', 'Api\ApiV1Controller@timelineHashtag');
}); });
Route::group(['prefix' => 'stories'], function () use($middleware) {
Route::get('v1/me', 'StoryController@apiV1Me');
Route::get('v1/recent', 'StoryController@apiV1Recent');
Route::post('v1/add', 'StoryController@apiV1Add')->middleware(array_merge($middleware, ['throttle:maxStoriesPerDay,1440']));
Route::get('v1/item/{id}', 'StoryController@apiV1Item');
Route::get('v1/fetch/{id}', 'StoryController@apiV1Fetch');
Route::get('v1/profile/{id}', 'StoryController@apiV1Profile');
Route::get('v1/exists/{id}', 'StoryController@apiV1Exists');
Route::delete('v1/delete/{id}', 'StoryController@apiV1Delete')->middleware(array_merge($middleware, ['throttle:maxStoryDeletePerDay,1440']));
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);
}); });

View file

@ -233,17 +233,24 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
Route::group(['prefix' => 'admin'], function () { Route::group(['prefix' => 'admin'], function () {
Route::post('moderate', 'Api\AdminApiController@moderate'); Route::post('moderate', 'Api\AdminApiController@moderate');
}); });
// Route::group(['prefix' => 'stories'], function () {
// Route::get('v0/recent', 'StoryController@apiV1Recent'); Route::group(['prefix' => 'web/stories'], function () {
// Route::post('v0/add', 'StoryController@apiV1Add'); Route::get('v1/recent', 'StoryController@recent');
// Route::get('v0/fetch/{id}', 'StoryController@apiV1Fetch'); Route::get('v1/viewers', 'StoryController@viewers');
// Route::get('v0/profile/{id}', 'StoryController@apiV1Profile'); Route::get('v1/profile/{id}', 'StoryController@profile');
// Route::get('v0/exists/{id}', 'StoryController@apiV1Exists'); Route::get('v1/exists/{id}', 'StoryController@exists');
// Route::delete('v0/delete/{id}', 'StoryController@apiV1Delete'); Route::get('v1/poll/results', 'StoryController@pollResults');
// Route::get('v0/item/{id}', 'StoryController@apiV1Item'); Route::post('v1/viewed', 'StoryController@viewed');
// Route::post('v0/crop', 'StoryController@cropPhoto'); Route::post('v1/react', 'StoryController@react');
// Route::post('v0/publish', 'StoryController@publishStory'); Route::post('v1/comment', 'StoryController@comment');
// }); Route::post('v1/publish/poll', 'StoryController@publishStoryPoll');
Route::post('v1/poll/vote', 'StoryController@storyPollVote');
Route::post('v1/report', 'StoryController@storeReport');
Route::post('v1/add', 'StoryController@apiV1Add');
Route::post('v1/crop', 'StoryController@cropPhoto');
Route::post('v1/publish', 'StoryController@publishStory');
Route::delete('v1/delete/{id}', 'StoryController@apiV1Delete');
});
}); });
@ -304,7 +311,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
Route::get('me', 'ProfileController@meRedirect'); Route::get('me', 'ProfileController@meRedirect');
Route::get('intent/follow', 'SiteController@followIntent'); Route::get('intent/follow', 'SiteController@followIntent');
Route::post('stories/viewed', 'StoryController@apiV1Viewed'); Route::get('rs/{id}', 'StoryController@remoteStory');
Route::get('stories/new', 'StoryController@compose'); Route::get('stories/new', 'StoryController@compose');
Route::get('my/story', 'StoryController@iRedirect'); Route::get('my/story', 'StoryController@iRedirect');
Route::get('web/profile/_/{id}', 'InternalApiController@remoteProfile'); Route::get('web/profile/_/{id}', 'InternalApiController@remoteProfile');
@ -498,6 +505,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
Route::get('{username}', 'ProfileController@permalinkRedirect'); Route::get('{username}', 'ProfileController@permalinkRedirect');
}); });
Route::get('/stories/{username}/{id}', 'StoryController@getActivityObject');
Route::get('stories/{username}', 'ProfileController@stories'); Route::get('stories/{username}', 'ProfileController@stories');
Route::get('p/{id}', 'StatusController@shortcodeRedirect'); Route::get('p/{id}', 'StatusController@shortcodeRedirect');
Route::get('c/{collection}', 'CollectionController@show'); Route::get('c/{collection}', 'CollectionController@show');