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

feat(parent structure): add method that return note parent structure #276

Merged
merged 32 commits into from
Oct 26, 2024

Conversation

dependentmadani
Copy link
Contributor

@dependentmadani dependentmadani commented Aug 29, 2024

Problem:

First task in issue #275, make a method to return recursively note parent structure.

Resolves #275

Solution:

Return an array of note parent structure on the following form:

NoteParents : 
[
  {
    noteId: Note['NotePublicId'],
    content: Note['content']
  }
]

Making sure that the user has access to each note parent before including them in the returned array.

Copy link

github-actions bot commented Aug 29, 2024

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 85.93% (🎯 80%)
⬆️ +0.14%
8569 / 9971
🟢 Statements 85.93% (🎯 80%)
⬆️ +0.14%
8569 / 9971
🔴 Functions 79.22% (🎯 80%)
⬆️ +0.31%
267 / 337
🟢 Branches 85.4% (🎯 80%)
⬆️ +0.13%
427 / 500
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/domain/service/note.ts 96.05% 84.74% 100% 96.05% 99-100, 126-127, 138-139, 167-168, 189-190, 277-278, 366-367, 383-384, 425-426
src/presentation/http/router/note.ts 98.07% 81.25% 100% 98.07% 152-153, 626-627, 643-649, 710-711, 767-768
src/repository/note.repository.ts 100% 100% 100% 100%
src/repository/noteRelations.repository.ts 100% 100% 100% 100%
src/repository/storage/postgres/orm/sequelize/note.ts 97.7% 80% 100% 97.7% 191-192, 235-236, 239-240, 295-296
src/repository/storage/postgres/orm/sequelize/noteRelations.ts 100% 93.33% 100% 100%
src/repository/storage/postgres/orm/sequelize/teams.ts 99.17% 85.71% 100% 99.17% 190-191
Generated in workflow #858 for commit 31aeb92 by the Vitest Coverage Report Action

src/domain/service/note.ts Outdated Show resolved Hide resolved
src/domain/service/note.ts Outdated Show resolved Hide resolved
src/domain/service/note.ts Outdated Show resolved Hide resolved
src/domain/entities/note.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/teams.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/teams.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/teams.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/teams.ts Outdated Show resolved Hide resolved
src/domain/entities/note.ts Outdated Show resolved Hide resolved
src/domain/entities/note.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/teams.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/teams.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/teams.ts Outdated Show resolved Hide resolved
@e11sy
Copy link
Contributor

e11sy commented Sep 6, 2024

you can also patch GET /note endpoint and related test in this pr on in the following one

Good job, almost done!

@dependentmadani
Copy link
Contributor Author

resolve #275

docker-compose.yml Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/teams.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.test.ts Show resolved Hide resolved
src/domain/entities/note.ts Outdated Show resolved Hide resolved
src/domain/service/note.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/teams.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/teams.ts Outdated Show resolved Hide resolved
docker-compose.yml Show resolved Hide resolved
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
docker-compose.yml Show resolved Hide resolved
src/domain/service/note.ts Outdated Show resolved Hide resolved
src/repository/note.repository.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/note.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/note.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
src/domain/service/note.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
src/repository/noteRelations.repository.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/note.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/teams.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
src/domain/service/note.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/note.ts Outdated Show resolved Hide resolved
src/domain/service/note.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
@neSpecc neSpecc self-requested a review October 16, 2024 21:05
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
src/presentation/http/router/note.test.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/note.ts Outdated Show resolved Hide resolved
@neSpecc neSpecc requested a review from slaveeks October 24, 2024 20:39
@dependentmadani dependentmadani merged commit 71fb7fb into main Oct 26, 2024
6 checks passed
@dependentmadani dependentmadani deleted the feat/return-note branch October 26, 2024 11:42
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.

[ Feature ] Return note parents with note
4 participants