Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add createdAt and updatedAt fields to RFR response #421

Open
adameli22 opened this issue Mar 25, 2024 · 2 comments
Open

Add createdAt and updatedAt fields to RFR response #421

adameli22 opened this issue Mar 25, 2024 · 2 comments
Labels
feature request Community feature request

Comments

@adameli22
Copy link

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
image

FLAT response
image

TREE response
image

@adameli22
Copy link
Author

adameli22 commented Mar 25, 2024

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
image

possible solution
image

@adameli22
Copy link
Author

I tested the solution and I can confirm that by adding this change the response will add all the missing fields
image

@cyp3rius cyp3rius added the feature request Community feature request label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Community feature request
Projects
None yet
Development

No branches or pull requests

2 participants