Skip to content

Endpoints for Listing Details Page, Middleware, Cache Service, SQL Query Logging Configuration#14

Merged
Prakhar896 merged 13 commits intomainfrom
prakhar
Jun 23, 2024
Merged

Endpoints for Listing Details Page, Middleware, Cache Service, SQL Query Logging Configuration#14
Prakhar896 merged 13 commits intomainfrom
prakhar

Conversation

@Prakhar896
Copy link
Copy Markdown
Contributor

@Prakhar896 Prakhar896 commented Jun 23, 2024

Overview:

  • /listingDetails endpoint for frontend to fetch listing data.
  • /getListingImage/:name endpoint for frontend Image components to fetch listing images.
  • /uploadListingImage endpoint for frontend to submit and attach new images to food listings.
  • /updateListing endpoint for frontend to update listing data.
  • Cache service created in services/Cache.js that is a key-value persistence storage option for minimal persistence needs
  • storeFile Multer middleware that stores files into FileStore directory
  • logRoutes middleware that logs all endpoint requests

Debug Makeshift Measures:

  • On boot, there's a onDBSynchronise method in which the code will auto-generate a sample FoodListing for my listing endpoints to work with (note that sample listing requires existence of sample3.jpg named file in FileManager context)
  • If there's any existing FoodListing, it'll latch onto that instead

Sensitive changes:

  • Commented out all the associations and made guestID primary key of Guest model for now. This is because there's some issues with the relationship design that are causing problems when creating instances of the models.

WILL NEED to be fixed later.

@Prakhar896 Prakhar896 added the enhancement New feature or request label Jun 23, 2024
@Prakhar896 Prakhar896 self-assigned this Jun 23, 2024
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skipping this middleware's implementation for now. We can always impose the headers requirements later. Speeds up debugging/development.

@Prakhar896 Prakhar896 merged commit 51218ee into main Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant