Skip to content

Commit

Permalink
[Fix] Me Routes
Browse files Browse the repository at this point in the history
- Fixed auth for me routes
  • Loading branch information
kiritokatklian committed Jul 13, 2024
1 parent 2fa206e commit 0b24084
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 2 deletions.
8 changes: 6 additions & 2 deletions routes/API/v1/Me.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@
use App\Http\Controllers\API\v1\MeController;

Route::prefix('/me')
->middleware('auth.kurozora')
->name('.me')
->group(function () {
Route::get('/', [MeController::class, 'me']);
Route::get('/', [MeController::class, 'me'])
->middleware('auth.kurozora');

Route::post('/', [MeController::class, 'updateProfile'])
->middleware('auth.kurozora')
->name('.update');

Route::get('/followers', [MeController::class, 'getFollowers'])
->middleware('auth.kurozora')
->name('.followers');

Route::get('/following', [MeController::class, 'getFollowing'])
->middleware('auth.kurozora')
->name('.following');

Route::get('/reviews', [MeController::class, 'getRatings'])
->middleware('auth.kurozora')
->name('.reviews');

require 'Me/Access-Tokens.php';
Expand Down
1 change: 1 addition & 0 deletions routes/API/v1/Me/Access-Tokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use App\Http\Controllers\API\v1\AccessTokenController;

Route::prefix('/access-tokens')
->middleware('auth.kurozora')
->name('.access-tokens')
->group(function () {
Route::get('/', [AccessTokenController::class, 'index'])
Expand Down
1 change: 1 addition & 0 deletions routes/API/v1/Me/Favorites.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use App\Http\Controllers\API\v1\UserFavoriteController;

Route::prefix('/favorites')
->middleware('auth.kurozora')
->name('.favorites')
->group(function () {
Route::get('/', [MeController::class, 'getFavorites'])
Expand Down
1 change: 1 addition & 0 deletions routes/API/v1/Me/Feed-Messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use App\Http\Controllers\API\v1\MeController;

Route::prefix('/feed-messages')
->middleware('auth.kurozora')
->name('.feed-messages')
->group(function () {
Route::get('/', [MeController::class, 'getFeedMessages'])
Expand Down
1 change: 1 addition & 0 deletions routes/API/v1/Me/Library.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use App\Http\Controllers\API\v1\MeController;

Route::prefix('/library')
->middleware('auth.kurozora')
->name('.library')
->group(function () {
Route::get('/', [MeController::class, 'getLibrary'])
Expand Down
1 change: 1 addition & 0 deletions routes/API/v1/Me/Notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use App\Http\Controllers\API\v1\NotificationController;

Route::prefix('/notifications')
->middleware('auth.kurozora')
->name('.notifications')
->group(function () {
Route::get('/', [NotificationController::class, 'index'])
Expand Down
1 change: 1 addition & 0 deletions routes/API/v1/Me/Recap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use App\Http\Controllers\API\v1\RecapController;

Route::prefix('/recap')
->middleware('auth.kurozora')
->name('.recap')
->group(function () {
Route::get('/', [RecapController::class, 'index'])
Expand Down
4 changes: 4 additions & 0 deletions routes/API/v1/Me/Reminders.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
->name('.reminder-anime')
->group(function () {
Route::get('/', [UserReminderController::class, 'tempIndex'])
->middleware('auth.kurozora')
->name('.index');

Route::post('/', [UserReminderController::class, 'create'])
->middleware('auth.kurozora')
->name('.create');

Route::get('/download', [UserReminderController::class, 'download'])
Expand All @@ -21,9 +23,11 @@
->name('.reminders')
->group(function () {
Route::get('/', [UserReminderController::class, 'index'])
->middleware('auth.kurozora')
->name('.index');

Route::post('/', [UserReminderController::class, 'create'])
->middleware('auth.kurozora')
->name('.create');

Route::get('/download', [UserReminderController::class, 'download'])
Expand Down
1 change: 1 addition & 0 deletions routes/API/v1/Me/Sessions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use App\Http\Controllers\API\v1\SessionController;

Route::prefix('/sessions')
->middleware('auth.kurozora')
->name('.sessions')
->group(function () {
Route::get('/', [SessionController::class, 'index'])
Expand Down

0 comments on commit 0b24084

Please sign in to comment.