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
there was an error when reordering menu items due to a missing variable
to a service class, so that was patched
also removed unecessary code from api url definitions and settings
service class
page tasks have been changed to accept JSON data for the sake of
consistency across the API. The only API method that will accept form
data is file uploads.
Also restored the post, put and delete pattern for better organization
and clarity describing what each page method is for
API accessible tasks (create, update, delete) have been updated to the
new format.
The controller needs to be cleaned up because it's a bit heavy and the
new API flow still needs to be properly documented, but it's a good
start
API Security has been reworked to check if request is secure, verifies
the API token created on site setup given to every member, and then
confirms the system is accepting API requests by way of the API enabled
toggle in settings
API usage is now only meant for backend use, so this needs to be noted
in the docs
removed all remaining API requests from the front end and removed the
FipamoAdminAPI js file, changing it to ContentRequest as it now handles
posting data to the system directly, authenticating it self by checking
the embedded CSRF token that regulary rotates
also renamed MaintenanceManager to Maintenance request and moved it to
the same dir as ContentRequest as they are both libraries that connect
to the backend
the current restore process only restored images and not the additional
file types that are allowed, so that has been added
also tweaked the reset request to include the correct token so the
request does not fail API authorization
regrouped api calls for better organization and to add a bit more
security. it now checks to make sure the incoming token matches the
current session to authorize requests
Removed email settings from settings.json and moved them to the .env
file to use Laravel's mailer functionality.
references to the old mailer has been removed from settings.json,
data sorting class and the settings template file
the front end script has also been updated to accomodate different
message types, starting with a test message so members can make sure the
settings defined in the .env are working
rather than make a massive downloadable archive file for ever image on
the site (which still may happen), a method has been added to make
copies of imags from an external site and store them on the fresh
install based on the image list saved in the created back up file
it's clean but some additional error checking is needed so the process
does not crash out when a file can't be located and upon completion the
user can be notified of what images did not make it over in the process
ported over the backup functionality from the old build to the new while
making few tweaks
instead of packaging up all files in the site to create massive zip
files, now a list of files is created for the user and blog directories
that the system will use to download and put them in the appropriate
directories, resulting in a such slimmer backup file.
archiving images my be added at a later date, but will be kept seperate
from the current back up process
the last ui page that needed to be added was managing the main
navigation menu for rendered pages, so that's been turned on. menu
items can be added by pinning pages to the menu when editing them and
can be removed by unpinning them or deleting them from the navigation
edit ui
it touched quite a few systems so all of those classes needed to be
edited as well tweaking the front end script to work with the new
modular script format
turned on the abiity to save settings to config file via the settings
page
the current member session needs to updated by the data coming in but
that will be handled by a specific member service that hasn't been built
yet, so just commenting it out for now
also fixed a minor bug that was stopping the save on render toggle from
working correctly, so now it's saving and updating the status properly
now
with the setting page set up, now the the settings api can be added,
beginning with the ability to render all files from settings.
the base settings api class is set up, so now the rest of the methods
can be added
editing page works but making new pages was still wonky, so that was
fixed and now page creation works fine
made some minor tweaks to prettier config for css formatting
ported over the new file uploader from the old build and made it a
service make for from some additonal file processing
i.e. image optimization or video converstion before it is saved to the system
start building out the new version of the page editing api while making
some changes to the original scripts for added flexibility and using the
full range of HTTP methods that weren't being used before.
currenlty, it's just an end to end test to make sure the plumbing works
as it should data is being passed and can be processed.
now that it all works, the guts of page editing can be completed
update sortablejs to the latest since it's been awhile and got rid of
the old version
so there was an error when trying to use services for API controllers
that was happening because the api middleware didn't pass the same info
as web middleware, resulting in session info not being passed to
controllers used in the api
after a bit of reading discovered necessary middleware could be added to
api routing so session data is available in in api routing
whew
Got the first part of the API working, which checks to see if there is a
valid session active to set up requests
also some small changes to get the favicon working, yeah, yeah, but it's
cool looking...
Removed the Slim Framework from the codebase and installed the latest
Laravel version to be the new foundation for the project moving forward.
Code from the old version will now be ported to the new version.