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

API PATCH /me/progress/:id - allow providing createdAt and respect provided finishedAt when syncing progress #3546

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

justcallmelarry
Copy link
Contributor

I was trying to make a script to set some of my old read books to done, but to avoid screwing up the stats i wanted to set them on a previous year.

I noticed some issues however, and during my research I found that there are some issues when creating and updating mediaProgress

  • createdAt (or startedAt, as the api documentation states) was not respected at all at either during creation or update.
  • finishedAt was not respected during creation, but can be updated after the initial call.

For the first issue, this allows createdAt to be set on creation but I could not figure out how to let it be updatable. My suspicion is that there is some magic going on which disallows the field createdAt to be updated due to sequelize default timestamps on their models.

For the second issue I just found where the finishedAt timestamp was overwritten on creation, and fixed the issue.

@justcallmelarry justcallmelarry changed the title allow setting createdAt and respect set finishedAt when syncing progress API PATCH /me/progress/:id - allow setting createdAt and respect set finishedAt when syncing progress Oct 22, 2024
@justcallmelarry justcallmelarry changed the title API PATCH /me/progress/:id - allow setting createdAt and respect set finishedAt when syncing progress API PATCH /me/progress/:id - allow setting createdAt and respect provided finishedAt when syncing progress Oct 22, 2024
@justcallmelarry justcallmelarry changed the title API PATCH /me/progress/:id - allow setting createdAt and respect provided finishedAt when syncing progress API PATCH /me/progress/:id - allow providing createdAt and respect provided finishedAt when syncing progress Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant