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: Simplify friendships #61

Merged
merged 1 commit into from
Sep 13, 2023
Merged

feat: Simplify friendships #61

merged 1 commit into from
Sep 13, 2023

Conversation

dcramer
Copy link
Owner

@dcramer dcramer commented Sep 13, 2023

This changes the friend model to be mutual acceptance by default vs one-way follows.

It creates a bit of a departure from the model of db => api => ui schemas, where follows in this case no longer map directly to a restful object.

Fixes GH-60

@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Patch coverage: 98.39% and project coverage change: -0.32% ⚠️

Comparison is base (98f5b51) 83.87% compared to head (67af80f) 83.55%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #61      +/-   ##
==========================================
- Coverage   83.87%   83.55%   -0.32%     
==========================================
  Files         127      125       -2     
  Lines        9989     9811     -178     
  Branches      847      825      -22     
==========================================
- Hits         8378     8198     -180     
- Misses       1611     1613       +2     
Files Changed Coverage Δ
apps/api/src/db/schema/enums.ts 100.00% <ø> (ø)
apps/api/src/routes/listFriends.ts 95.45% <92.85%> (ø)
apps/api/src/routes/addFriend.ts 97.26% <97.26%> (ø)
apps/api/src/app.ts 92.07% <100.00%> (+7.92%) ⬆️
apps/api/src/db/schema/notifications.ts 100.00% <100.00%> (ø)
apps/api/src/lib/notifications.ts 69.11% <100.00%> (-19.12%) ⬇️
apps/api/src/lib/serializers/friend.ts 100.00% <100.00%> (ø)
apps/api/src/lib/serializers/notification.ts 93.88% <100.00%> (+1.08%) ⬆️
apps/api/src/lib/serializers/user.ts 98.52% <100.00%> (+0.02%) ⬆️
apps/api/src/routes/addTastingComment.ts 89.06% <100.00%> (ø)
... and 5 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This changes the friend model to be mutual acceptance by default vs one-way follows.

It creates a bit of a departure from the model of db => api => ui schemas, where follows in this case no longer map directly to a restful object.
@dcramer dcramer merged commit 6596733 into main Sep 13, 2023
2 of 3 checks passed
@dcramer dcramer deleted the feat/refactor-friends branch September 13, 2023 15:20
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.

Make following/followers a simple friendship relationship
1 participant