strapi-plugin-navigation
strapi-plugin-navigation copied to clipboard
Add createdAt and updatedAt fields to RFR response
Im trying to generate a sitemap from the navigation plugin and the easiest way to do that is with the RFR response doe to it returning a single list with all the routes and their full path that is very easy to iterate through. The only issue is that unlike TREE and FLAT the RFR response does not return the updatedAt and createdAt field indicating when the Strapi content was created and last updated which is important for the sitemap. Is there an easy way to add these fields to the response since they are in both the TREE and the FLAT response?
RFR response
FLAT response
TREE response
I have not tested this yet. But I checked out the function that renders the RFR page and I was wondering if instead of only returning the id and contentType it could be possible to spread out the related variable to return all the related information.
function now
possible solution
I tested the solution and I can confirm that by adding this change the response will add all the missing fields