From ea9dbf025e9f83836fb90be5e945a082d6afa08b Mon Sep 17 00:00:00 2001 From: ro Date: Fri, 26 Jul 2024 15:10:37 -0600 Subject: [PATCH] Settings API, Part 1 the first part of the setting API has been restored, with the methods sync, publish and nav-sync restored to working order under the new API pattern. Documentation for the API will be completed after the upgrade is complete. There was also a script error when trying to edit a page from the link menu on the dashboard, so that has been fixed as well --- public/assets/scripts/dash/app/controllers/NavIndex.js | 2 +- routes/api.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/assets/scripts/dash/app/controllers/NavIndex.js b/public/assets/scripts/dash/app/controllers/NavIndex.js index 8fb6744..b726c1b 100644 --- a/public/assets/scripts/dash/app/controllers/NavIndex.js +++ b/public/assets/scripts/dash/app/controllers/NavIndex.js @@ -68,7 +68,7 @@ export default class NavIndex { case 'edit-item': self.processing = false; window.location = - '/dashboard/page/edit/' + e.target.getAttribute('data-id'); + '/dashboard/page/edit/' + e.target.getAttribute('data-uuid'); break; } } diff --git a/routes/api.php b/routes/api.php index b1bff9c..c77a142 100644 --- a/routes/api.php +++ b/routes/api.php @@ -26,7 +26,7 @@ Route::group(['prefix' => '/admin/page', 'middleware' => 'validate.key'], functi }); //settings -Route::group(['prefix' => '/v1/settings', 'middleware' => 'validate.key'], function () { +Route::group(['prefix' => '/admin/settings', 'middleware' => 'validate.key'], function () { Route::put("/publish", [SettingsAPIController::class, 'publish']); Route::put("/sync", [SettingsAPIController::class, 'sync']); Route::put("/nav-sync", [SettingsAPIController::class, 'navSync']);