Add Mongoose timestamps to the Movie schema to track creation and update times.
Note
Add Mongoose timestamps to Movie, introduce authenticated GET /movies/last-update returning ISO timestamp, and add frontend element id to show last update.
Backend:
Schema: Enable timestamps: true on models/Movie to track createdAt/updatedAt.
API: Add GET /movies/last-update with JWT auth; returns { lastUpdated: <ISO> } derived from updatedAt/createdAt/_id timestamp.
Frontend:
Movies page: add id="movies-last-updated" element to display last update time.
Written by Cursor Bugbot for commit 0d35a19cc5. This will update automatically on new commits. Configure here.
Add Mongoose timestamps to the Movie schema to track creation and update times.
---
<a href="https://cursor.com/background-agent?bcId=bc-842c4af0-74e1-482b-9910-a15047f650c4"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in Cursor" src="https://cursor.com/open-in-cursor.svg"></picture></a> <a href="https://cursor.com/agents?id=bc-842c4af0-74e1-482b-9910-a15047f650c4"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web" src="https://cursor.com/open-in-web.svg"></picture></a>
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Add Mongoose timestamps to Movie, introduce authenticated GET /movies/last-update returning ISO timestamp, and add frontend element id to show last update.
>
> - **Backend**:
> - **Schema**: Enable `timestamps: true` on `models/Movie` to track `createdAt`/`updatedAt`.
> - **API**: Add `GET /movies/last-update` with JWT auth; returns `{ lastUpdated: <ISO> }` derived from `updatedAt`/`createdAt`/`_id` timestamp.
> - **Frontend**:
> - Movies page: add `id="movies-last-updated"` element to display last update time.
>
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0d35a19cc51cb7943d1e0bd2c35cb65125e93f8e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch. Learn more about Cursor Agents
Cursor Agent can help with this pull request. Just `@cursor` in comments and I'll start working on changes in this branch.
<sub>[Learn more](https://cursor.com/docs/background-agent/web-and-mobile) about Cursor Agents</sub>
cursor[bot]
(Migrated from github.com)
left a comment
Copy Link
Copy Source
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
### This PR is being reviewed by Cursor Bugbot
<details>
<summary>Details</summary>
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the [Cursor dashboard](https://www.cursor.com/dashboard?tab=bugbot) to activate Pro and start your 14-day free trial.
</details>
Missing frontend code to display last update timestamp
The #movies-last-updated HTML element is added and the /last-update API endpoint is implemented, but there's no JavaScript code in app_movies.js to fetch from the endpoint and update the DOM element. Users will always see "—" instead of the actual last update timestamp, making this feature non-functional.
### Missing frontend code to display last update timestamp
<!-- **Medium Severity** -->
<!-- DESCRIPTION START -->
The `#movies-last-updated` HTML element is added and the `/last-update` API endpoint is implemented, but there's no JavaScript code in `app_movies.js` to fetch from the endpoint and update the DOM element. Users will always see "—" instead of the actual last update timestamp, making this feature non-functional.
<!-- DESCRIPTION END -->
<!-- LOCATIONS START
public/movies.html#L100-L101
routes/movies.js#L41-L66
LOCATIONS END -->
<details>
<summary>Additional Locations (1)</summary>
- [`routes/movies.js#L41-L66`](https://github.com/quoije/oscars-pool/blob/0d35a19cc51cb7943d1e0bd2c35cb65125e93f8e/routes/movies.js#L41-L66)
</details>
<a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MiJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmFiZTZjYjNjLTM2NmItNGY5NC04OGU5LTllMThkODU0NDQ3ZCIsImVuY3J5cHRpb25LZXkiOiJEclRja1ZiSVc5a2lETjhZN2JkNC1HWWlhZGU0Z0I1S2RYNHVOTk9yUmdNIiwiYnJhbmNoIjoiY3Vyc29yL21vdmllLWxhc3QtdXBkYXRlLXRpbWUtNjQ2MSJ9LCJpYXQiOjE3NjYyNjY0ODgsImV4cCI6MTc2ODg1ODQ4OH0.VCigOSl0VVsRlJ3PuJABowRj5EzfGOw3Gixr3gbQEulSDn0rNFIkXMzflyZgiDERnvNfK8txCNbpaUq471JAzZT7LS3dof8ZfsYqWxkROy4-gyydtqXiz5hpFLPhi9WMu6aanIVavxPHuF_-wtwxjVn_PKALIvqQgd9yumH3ZN5IpYx8o7F0IsO_kWWQoBh5Mr8uF1x6lD9u_duPzobyIGyyUXUeqSqBr1y9G_4-DWjhgS1t5HLZlubuduvJpKBQBlTufiIAVmYWQsHq1KwnUAFvirGHUmP1FEJkLG7eSKZp61l5GGmd1G8Dg-VheHYLpWut3-E1tW2m3sdDfgCbQw" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a> <a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MiJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmFiZTZjYjNjLTM2NmItNGY5NC04OGU5LTllMThkODU0NDQ3ZCIsImVuY3J5cHRpb25LZXkiOiJEclRja1ZiSVc5a2lETjhZN2JkNC1HWWlhZGU0Z0I1S2RYNHVOTk9yUmdNIiwiYnJhbmNoIjoiY3Vyc29yL21vdmllLWxhc3QtdXBkYXRlLXRpbWUtNjQ2MSIsInJlcG9Pd25lciI6InF1b2lqZSIsInJlcG9OYW1lIjoib3NjYXJzLXBvb2wiLCJwck51bWJlciI6MiwiY29tbWl0U2hhIjoiMGQzNWExOWNjNTFjYjc5NDNkMWUwYmQyYzM1Y2I2NTEyNWU5M2Y4ZSIsInByb3ZpZGVyIjoiZ2l0aHViIn0sImlhdCI6MTc2NjI2NjQ4OCwiZXhwIjoxNzY4ODU4NDg4fQ.Qr4tU8ozI1z0CKvXHKWwXs-MmIZ_3bxnF75aJSEkrsqLoIFy2jgJJh2Z11JZsI76r2qQBO31-YAvmDWhiMOQuJtOFwouJ41tGD1k8giY2tYzPcvGzxP-HtwMS3gwKcs6VFPT3f2_d7TaZeqJNT5ozVaGHNtyZRJoK4Jo9upigBMj1E4xJqv-1jguuyjUbCiRtqe_wvBjf0BTGE_nXuDKKdIWcPhcLyY1tCpeBLvnZw2C08dXZpeqBMlrGpPAB76yfiqoHfZvQoW4DozsDEudkzo3ahSoN_CiBLVApUXATp-pNLGU8Lz8wLWmC9Bei33NvDhayTciQYX5ESbKxBku6w" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Add Mongoose timestamps to the Movie schema to track creation and update times.
Cursor Agent can help with this pull request. Just
@cursorin comments and I'll start working on changes in this branch.Learn more about Cursor Agents
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
@@ -100,3 +100,3 @@<div class="alert alert-warning fade show" role="alert">Dernière mise à jour des films: <strong>—</strong>Dernière mise à jour des films: <strong id="movies-last-updated">—</strong></div>Missing frontend code to display last update timestamp
The
#movies-last-updatedHTML element is added and the/last-updateAPI endpoint is implemented, but there's no JavaScript code inapp_movies.jsto fetch from the endpoint and update the DOM element. Users will always see "—" instead of the actual last update timestamp, making this feature non-functional.Additional Locations (1)
routes/movies.js#L41-L66