snoryder8019 / rw_socket

1 stars 0 forks source link

cleaning up routes!! Video Bucket Errors later. #55

Open snoryder8019 opened 2 months ago

snoryder8019 commented 2 months ago

Lets charge forward with updating the routeBuilder.js

Thoughts: this Video bucket error may solve itself when we get the: "post.renderAddForm:generalForm.ejs " " post.renderEditForms:generalEditForm.ejs " more Dynamic. in routes/helpers/routeBuilder.js

Ultimately, this allows us to delete the /renderAddForm, /renderEditForm, and the less important /section routes from the individual route files.

Primary files to update:

routes/helpers/routeBuilder.js

--add renderEditForm and renderAddForm to route builder, passing a third argument for xreferences on objects in the DB.

views/forms/generalForm.ejs && generalEditForm.ejs

--accepts params from formBuilder.js from new routeBuilder.js params

these are dependant on the formBulder.js in plugins

after: remove Blog() dependency on: /views/forms/GeneralBlogForm.ejs /views/forms/generalEditBlogForm.ejs

codesources: /routes/adminFunctions/videos/videos.js /plugins/mongo/models/Videos.js /plugins/aws_sdk/ /plugins/multer/ /routes/helpers/routeBuilder.js %% imagesArray.js /plugins/helpers/formBuilder.js /plugins/mongo/helpers/models.js /views/forms/generalFrom.ejs && generalEditForm.ejs /views/admin/videos/template.ejs

The best Examples sectionsSettings.js destinations.js and blogs.js for getting forms to render and send the req.body correctly.

*VIDEO ERROR Actions on the App to recreate the video error: -create Video from admin panel. Upload video as normal. -edit Video with a boolean or non text setting, Save -view video in the intended section of webapp , MIME error in video player? Quite possibly. -Inspect the element and console in the browser: common warning in console : Media resource https://us-ord-1.linodeobjects.com/royal-bucket/videos/1727024624454-20240922_110232.mp4 could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_METADATA_ERR (0x806e0006)

FYI: I've learned the opaque error in the browser console, is usually a bad link, because rotate re-names the url and that was a bad idea!!! . This was due to bad implementation of the avatar rotate function, I will work out the rotate issues. That's why you'll see an avatar missing its image. /userFunctions/avatars/avatars.js

snoryder8019 commented 1 month ago

How was this description? More or less confusing?