This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(api:users:submissions:overtime): submission with one year
## problem - user submissions overtime chart doesn't render correctly if the user has only one year of submissions ## solution - check if the submissions contain the current year - if it doesn't add an entry in the object - `[current year]: 0` ## why - this will fix the issue if there was one year in the user submissions - ex: - user submissions only has year 2015 - checks if current year is included in the submissions, - adds current year - fill in the years missing - chart renders correctly ## where - ./src/app/api/users/[username]/submissions/overtime/route.ts ## usage
- Loading branch information