Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
fr0tt committed Oct 7, 2023
1 parent d4773f3 commit c8c0651
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use App\Models\Share;
use App\Models\Collection;

class ShareController extends Controller
class PublicShareController extends Controller
{

public function index(Request $request)
Expand Down
2 changes: 1 addition & 1 deletion resources/js/store/modules/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default {
}
axios.defaults.headers.common = { Authorization: `Bearer ${token}` }
axios
.get('/api/shares/me')
.get('/api/shares/public/me')
.then((response) => {
const share = response.data.data
context.commit('setStaticAuth', share)
Expand Down
13 changes: 6 additions & 7 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use App\Http\Controllers\FileController;
use App\Http\Controllers\ImportController;
use App\Http\Controllers\PostController;
use App\Http\Controllers\ShareController;
use App\Http\Controllers\PublicShareController;
use App\Http\Controllers\TestingController;
use App\Http\Controllers\TagController;
use App\Http\Controllers\UserController;
Expand Down Expand Up @@ -59,16 +59,15 @@
Route::patch('users/{id}', [UserController::class, 'update']);
Route::delete('users/{id}', [UserController::class, 'destroy']);

Route::get('shares', [ShareController::class, 'index']);
Route::post('shares', [ShareController::class, 'store']);
Route::patch('shares/{id}', [ShareController::class, 'update']);
Route::delete('shares/{id}', [ShareController::class, 'destroy']);
Route::get('shares/public', [PublicShareController::class, 'index']);
Route::post('shares/public', [PublicShareController::class, 'store']);
Route::patch('shares/public/{id}', [PublicShareController::class, 'update']);
Route::delete('shares/public/{id}', [PublicShareController::class, 'destroy']);

Route::post('files', [FileController::class, 'store']);

Route::post('imports', [ImportController::class, 'store']);
Route::get('exports', [ExportController::class, 'index']);

});

Route::group([
Expand All @@ -77,7 +76,7 @@
Route::get('posts', [PostController::class, 'index']);
Route::get('posts/{id}', [PostController::class, 'show']);

Route::get('shares/me', [ShareController::class, 'me']);
Route::get('shares/public/me', [PublicShareController::class, 'me']);
});


Expand Down

0 comments on commit c8c0651

Please sign in to comment.