]> BookStack Code Mirror - bookstack/blobdiff - routes/web.php
Added migration file.
[bookstack] / routes / web.php
index 4bd2b4a069f6962c0504d5396c8f4f7f6f4388be..463e4e77ba494ce10d476017f1b9d9d385d88b29 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-Route::get('/translations.js', 'HomeController@getTranslations');
+Route::get('/translations', 'HomeController@getTranslations');
 
 // Authenticated routes...
 Route::group(['middleware' => 'auth'], function () {
@@ -119,15 +119,19 @@ Route::group(['middleware' => 'auth'], function () {
 
     Route::get('/ajax/search/entities', 'SearchController@searchEntitiesAjax');
 
+    // Comments
+    Route::post('/ajax/page/{pageId}/comment/', 'CommentController@save');
+    Route::put('/ajax/page/{pageId}/comment/{commentId}', 'CommentController@save');
+    Route::delete('/ajax/comment/{id}', 'CommentController@destroy');
+    Route::get('/ajax/page/{pageId}/comments/', 'CommentController@getPageComments');
+
     // Links
     Route::get('/link/{id}', 'PageController@redirectFromLink');
 
     // Search
-    Route::get('/search/all', 'SearchController@searchAll');
-    Route::get('/search/pages', 'SearchController@searchPages');
-    Route::get('/search/books', 'SearchController@searchBooks');
-    Route::get('/search/chapters', 'SearchController@searchChapters');
+    Route::get('/search', 'SearchController@search');
     Route::get('/search/book/{bookId}', 'SearchController@searchBook');
+    Route::get('/search/chapter/{bookId}', 'SearchController@searchChapter');
 
     // Other Pages
     Route::get('/', 'HomeController@index');