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

chore(team): Implemented public team member #267

Merged
merged 10 commits into from
Jul 4, 2024
Merged

Conversation

e11sy
Copy link
Contributor

@e11sy e11sy commented Jul 4, 2024

This PR is related to join route usage on web side (it should not know noteInternalId which now returns on join route)

  • added TeamMemberPublic entity (team member without team relation id and with notePublicId as noteId)
  • added shared service method for getting public noteId by NoteInternalid
  • made join route return TeamMember with public noteId
  • patched repository function
  • isUserTeamMember() method deprecated
  • Now we can use getTeamMemberByNoteAndUserId because it uses same storage logic (we can check teamMember that we got on null just in domain service)
  • get rid of the result : {} decoration in /join route

Copy link

github-actions bot commented Jul 4, 2024

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 85.48% (🎯 80%)
⬇️ -0.05%
7782 / 9103
🟢 Statements 85.48% (🎯 80%)
⬇️ -0.05%
7782 / 9103
🔴 Functions 77.81% (🎯 80%)
⬆️ +0.07%
242 / 311
🟢 Branches 85.33% (🎯 80%)
⬇️ -0.16%
390 / 457
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/domain/entities/team.ts 100% 100% 100% 100%
src/domain/service/note.ts 95.74% 85.41% 100% 95.74% 75-76, 102-103, 109-110, 125-126, 147-148, 235-236, 324-325
src/domain/service/noteSettings.ts 97.18% 88% 100% 97.18% 118-119, 125-126, 197-198
src/domain/service/shared/note.ts 0% 0% 0% 0% 1-22
src/presentation/http/router/join.ts 100% 100% 100% 100%
src/repository/team.repository.ts 100% 100% 100% 100%
src/repository/storage/postgres/orm/sequelize/teams.ts 99.17% 85.71% 100% 99.17% 191-192
Generated in workflow #784

e11sy added 5 commits July 4, 2024 14:52
- now team member pubic does not contain id of team relation
- isUserInTeam deprecated
- now we have getTeamMemberByNoteAndUserId method which will return null if user is not in team, teamMember otherwhise
@e11sy e11sy requested review from neSpecc and slaveeks July 4, 2024 12:10
src/domain/service/note.ts Outdated Show resolved Hide resolved
src/repository/storage/postgres/orm/sequelize/teams.ts Outdated Show resolved Hide resolved
src/domain/service/note.ts Outdated Show resolved Hide resolved
@e11sy e11sy merged commit b393213 into main Jul 4, 2024
6 checks passed
@e11sy e11sy deleted the implement-public-team-member branch July 4, 2024 12:43
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