Skip to content

Commit

Permalink
remove unused index routes
Browse files Browse the repository at this point in the history
  • Loading branch information
emmachughes committed Sep 16, 2024
1 parent ec4d8a8 commit 0872645
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,6 @@ public function __construct(private readonly Lti $lti)
$this->middleware('core.behavior-settings:view', ['only' => ['show']]);
}

/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
abort(404);
}

/**
* Show the form for creating a new resource.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ public function __construct(
$this->middleware('core.locale', ['only' => ['create', 'edit', 'store']]);
}

public function index(): View
{
$title = "Viewing H5P content";
return view('h5p.index', ['title' => $title, 'message' => trans('h5p-editor.need-id')]);
}

public function doShow($id, $context, $preview = false): View
{
$ltiRequest = $this->lti->getRequest(request());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
'anonymous' => "Anonymous",
'could-not-find-content' => 'Could not find or create the content you want. Sorry! :(',
'download-not-available' => 'Download not available',
'need-id' => "You need an ID to view content",
];
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
'anonymous' => "익명의",
'could-not-find-content' => '원하는 콘텐츠를 찾거나 만들 수 없습니다. 죄송합니다! :(',
'download-not-available' => '다운로드 이용불가',
'need-id' => "콘텐츠를 보기 위해서는 ID가 필요합니다.",
];
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
'anonymous' => "Anonym",
'could-not-find-content' => 'Kunne ikke finne eller opprette innholdet du ønsker! Beklager. :(',
'download-not-available' => 'Fil ikke tilgjengelig',
'need-id' => "Du trenger en ID for å se innhold",
];
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
'anonymous' => "Anonym",
'could-not-find-content' => 'Kunne ikkje finne eller opprette innhaldet du ynskjer. Me beklager! :(',
'download-not-available' => 'Nedlasting er ikkje tilgjengeleg',
'need-id' => "Du treng ein ID for å sjå innhaldet",
];
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

return [
'need-id' => "Du behöver ett ID för att se innehåll",
];

This file was deleted.

10 changes: 5 additions & 5 deletions sourcecode/apis/contentauthor/routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
})->name('h5p.adapter')->middleware('adaptermode');
Route::get('h5p/{h5p}/copyright', [H5PController::class, 'getCopyright']);
Route::get('h5p/{h5p}/info', [H5PController::class, 'getInfo']);
Route::resource('/h5p', H5PController::class, ['except' => ['destroy']]);
Route::resource('/h5p', H5PController::class, ['except' => ['index', 'destroy']]);

Route::get('images/browse', [H5PController::class, 'browseImages']);
Route::get('images/browse/{imageId}', [H5PController::class, 'getImage']);
Expand Down Expand Up @@ -74,10 +74,10 @@

Route::match(['GET', 'POST'], '/create/{contenttype?}', [ContentController::class, 'index'])->middleware(["lti.verify-auth", "lti.question-set", 'core.behavior-settings:editor'])->name('create');

Route::resource('questionset', QuestionSetController::class, ['except' => ['destroy']]);
Route::resource('questionset', QuestionSetController::class, ['except' => ['index', 'destroy']]);
Route::post('questionset/{id}/edit', [QuestionSetController::class, 'ltiEdit']);

Route::resource('game', GameController::class, ['except' => ['destroy']]);
Route::resource('game', GameController::class, ['except' => ['index', 'destroy']]);
Route::post('game/{id}/edit', [GameController::class, 'ltiEdit']);

Route::group(['middleware' => ['core.ownership']], function () {
Expand All @@ -88,8 +88,8 @@

Route::get('/slo', [SingleLogoutController::class, 'index'])->name('slo'); // Single logout route

Route::resource('/article', ArticleController::class, ['except' => ['destroy']]);
Route::resource('/link', LinkController::class, ['except' => ['destroy']]);
Route::resource('/article', ArticleController::class, ['except' => ['index', 'destroy']]);
Route::resource('/link', LinkController::class, ['except' => ['index', 'destroy']]);

Route::post('/article/create/upload', [ArticleUploadController::class, 'uploadToNewArticle'])->name('article-upload.new');
Route::post('/article/{id}/upload', [ArticleUploadController::class, 'uploadToExistingArticle'])->name('article-upload.existing');
Expand Down

0 comments on commit 0872645

Please sign in to comment.