]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/UserPreferencesController.php
Fix timestamp in API docs example response
[bookstack] / app / Http / Controllers / UserPreferencesController.php
index e5ac69818f98ec976b5d8e18a4adc9a3eb22385a..560dd16321589bc1611bf9e5ef52579d194a4caf 100644 (file)
@@ -41,7 +41,7 @@ class UserPreferencesController extends Controller
         setting()->putForCurrentUser('ui-shortcuts', $shortcuts->toJson());
         setting()->putForCurrentUser('ui-shortcuts-enabled', $enabled);
 
-        $this->showSuccessNotification('Shortcut preferences have been updated!');
+        $this->showSuccessNotification(trans('preferences.shortcuts_update_success'));
 
         return redirect('/preferences/shortcuts');
     }
@@ -115,6 +115,9 @@ class UserPreferencesController extends Controller
         return response('', 204);
     }
 
+    /**
+     * Update the favorite status for a code language.
+     */
     public function updateCodeLanguageFavourite(Request $request)
     {
         $validated = $this->validate($request, [
@@ -134,5 +137,6 @@ class UserPreferencesController extends Controller
         }
 
         setting()->putForCurrentUser('code-language-favourites', implode(',', $currentFavorites));
+        return response('', 204);
     }
 }