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

Recent note list #239

Merged
merged 14 commits into from
Apr 3, 2024
Merged

Recent note list #239

merged 14 commits into from
Apr 3, 2024

Conversation

e11sy
Copy link
Contributor

@e11sy e11sy commented Mar 30, 2024

  • get rid of noteList service
  • added insertNoteVisit method to database helpers
  • now noteList router uses note service
  • added migration to make user_id index in note_visits table not unique (for each user there would be many note visits)
  • refactored noteList.test
  • updated eslint-config-codex to latest version since it treats unused vars different

- added storage method to get noteList ordered by time of last visit
- get rid of the NoteListService (moved to NoteService)
- minor fixes in noteVisits model
- moved noteList tests to note tests
- implemented insertNoteVisit method to database helpers
Copy link
Member

@neSpecc neSpecc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No description provided.

src/domain/entities/noteVisit.ts Outdated Show resolved Hide resolved
src/domain/service/noteVisits.ts Outdated Show resolved Hide resolved
src/domain/service/note.ts Show resolved Hide resolved
- deleted unwanted repository usage
- comments improved
- added order by visitedAt field for note list
Copy link

github-actions bot commented Mar 30, 2024

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 86.41% (🎯 80%)
⬆️ +0.07%
7120 / 8239
🟢 Statements 86.41% (🎯 80%)
⬆️ +0.07%
7120 / 8239
🔴 Functions 79.32% (🎯 80%)
🟰 ±0%
234 / 295
🟢 Branches 85.71% (🎯 80%)
⬇️ -0.21%
354 / 413
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/domain/index.ts 100% 100% 100% 100%
src/domain/service/note.ts 95.39% 79.16% 100% 95.39% 59-60, 87-88, 94-95, 110-111, 134-135
src/presentation/http/http-api.ts 95.89% 90.32% 93.75% 95.89% 95-103, 115-116, 305-306, 330-331
src/presentation/http/router/noteList.ts 100% 100% 100% 100%
src/repository/index.ts 100% 100% 100% 100%
src/repository/note.repository.ts 100% 100% 100% 100%
src/repository/storage/postgres/orm/sequelize/note.ts 97.97% 78.57% 100% 97.97% 181-182, 228-229, 264-265
src/repository/storage/postgres/orm/sequelize/noteVisits.ts 86.56% 100% 80% 86.56% 116-133
src/tests/utils/database-helpers.ts 97.97% 94.73% 91.66% 97.97% 172-177
Generated in workflow #647

src/presentation/http/router/noteList.test.ts Outdated Show resolved Hide resolved
src/presentation/http/router/noteList.ts Outdated Show resolved Hide resolved
src/tests/utils/database-helpers.ts Outdated Show resolved Hide resolved
- removed unwanted eslint disable respectfully to latest eslint-config-codex
- updated eslint-config-codex version in package.json
@e11sy e11sy merged commit f100ad3 into main Apr 3, 2024
6 checks passed
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.

4 participants