Update web routes

This commit is contained in:
Daniel Supernault 2019-09-15 18:44:32 -06:00
parent 3c306c5e17
commit 0dd4f1f9cd
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -77,19 +77,19 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
Route::get('nodeinfo/2.0.json', 'FederationController@nodeinfo'); Route::get('nodeinfo/2.0.json', 'FederationController@nodeinfo');
Route::group(['prefix' => 'v1'], function () { Route::group(['prefix' => 'v1'], function () {
Route::get('accounts/verify_credentials', 'ApiController@verifyCredentials'); // Route::get('accounts/verify_credentials', 'ApiController@verifyCredentials');
Route::get('accounts/relationships', 'PublicApiController@relationships'); // Route::get('accounts/relationships', 'PublicApiController@relationships');
Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses'); // Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses');
Route::get('accounts/{id}/following', 'PublicApiController@accountFollowing'); // Route::get('accounts/{id}/following', 'PublicApiController@accountFollowing');
Route::get('accounts/{id}/followers', 'PublicApiController@accountFollowers'); // Route::get('accounts/{id}/followers', 'PublicApiController@accountFollowers');
Route::get('accounts/{id}', 'PublicApiController@account'); // Route::get('accounts/{id}', 'PublicApiController@account');
Route::post('avatar/update', 'ApiController@avatarUpdate'); // Route::post('avatar/update', 'ApiController@avatarUpdate');
Route::get('likes', 'ApiController@hydrateLikes'); // Route::get('likes', 'ApiController@hydrateLikes');
Route::post('media', 'ApiController@uploadMedia'); // Route::post('media', 'ApiController@uploadMedia');
Route::delete('media', 'ApiController@deleteMedia'); // Route::delete('media', 'ApiController@deleteMedia');
Route::get('notifications', 'ApiController@notifications'); // Route::get('notifications', 'ApiController@notifications');
Route::get('timelines/public', 'PublicApiController@publicTimelineApi'); // Route::get('timelines/public', 'PublicApiController@publicTimelineApi');
Route::get('timelines/home', 'PublicApiController@homeTimelineApi'); // Route::get('timelines/home', 'PublicApiController@homeTimelineApi');
}); });
Route::group(['prefix' => 'v2'], function() { Route::group(['prefix' => 'v2'], function() {
Route::get('config', 'ApiController@siteConfiguration'); Route::get('config', 'ApiController@siteConfiguration');
@ -107,7 +107,38 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
Route::get('discover/tag', 'DiscoverController@getHashtags'); Route::get('discover/tag', 'DiscoverController@getHashtags');
Route::post('status/compose', 'InternalApiController@composePost')->middleware('throttle:maxPostsPerHour,60')->middleware('throttle:maxPostsPerDay,1440'); Route::post('status/compose', 'InternalApiController@composePost')->middleware('throttle:maxPostsPerHour,60')->middleware('throttle:maxPostsPerDay,1440');
}); });
Route::group(['prefix' => 'pixelfed'], function() {
Route::group(['prefix' => 'v1'], function() {
Route::get('accounts/verify_credentials', 'ApiController@verifyCredentials');
Route::get('accounts/relationships', 'PublicApiController@relationships');
Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses');
Route::get('accounts/{id}/following', 'PublicApiController@accountFollowing');
Route::get('accounts/{id}/followers', 'PublicApiController@accountFollowers');
Route::get('accounts/{id}', 'PublicApiController@account');
Route::post('avatar/update', 'ApiController@avatarUpdate');
Route::get('likes', 'ApiController@hydrateLikes');
Route::post('media', 'ApiController@uploadMedia');
Route::delete('media', 'ApiController@deleteMedia');
Route::get('notifications', 'ApiController@notifications');
Route::get('timelines/public', 'PublicApiController@publicTimelineApi');
Route::get('timelines/home', 'PublicApiController@homeTimelineApi');
});
});
Route::group(['prefix' => 'local'], function () { Route::group(['prefix' => 'local'], function () {
// Route::get('accounts/verify_credentials', 'ApiController@verifyCredentials');
// Route::get('accounts/relationships', 'PublicApiController@relationships');
// Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses');
// Route::get('accounts/{id}/following', 'PublicApiController@accountFollowing');
// Route::get('accounts/{id}/followers', 'PublicApiController@accountFollowers');
// Route::get('accounts/{id}', 'PublicApiController@account');
// Route::post('avatar/update', 'ApiController@avatarUpdate');
// Route::get('likes', 'ApiController@hydrateLikes');
// Route::post('media', 'ApiController@uploadMedia');
// Route::delete('media', 'ApiController@deleteMedia');
// Route::get('notifications', 'ApiController@notifications');
// Route::get('timelines/public', 'PublicApiController@publicTimelineApi');
// Route::get('timelines/home', 'PublicApiController@homeTimelineApi');
Route::post('status/compose', 'InternalApiController@composePost')->middleware('throttle:maxPostsPerHour,60')->middleware('throttle:maxPostsPerDay,1440'); Route::post('status/compose', 'InternalApiController@composePost')->middleware('throttle:maxPostsPerHour,60')->middleware('throttle:maxPostsPerDay,1440');
Route::get('exp/rec', 'ApiController@userRecommendations'); Route::get('exp/rec', 'ApiController@userRecommendations');
Route::post('discover/tag/subscribe', 'HashtagFollowController@store')->middleware('throttle:maxHashtagFollowsPerHour,60')->middleware('throttle:maxHashtagFollowsPerDay,1440');; Route::post('discover/tag/subscribe', 'HashtagFollowController@store')->middleware('throttle:maxHashtagFollowsPerHour,60')->middleware('throttle:maxHashtagFollowsPerDay,1440');;