dcramer / peated

https://peated.com
Apache License 2.0
63 stars 13 forks source link

feat: Simplify friendships #61

Closed dcramer closed 1 year ago

dcramer commented 1 year ago

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[bot] commented 1 year ago

Codecov Report

Patch coverage: 98.39% and project coverage change: -0.32% :warning:

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

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/dcramer/peated/pull/61?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Cramer) | Coverage Δ | | |---|---|---| | [apps/api/src/db/schema/enums.ts](https://app.codecov.io/gh/dcramer/peated/pull/61?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Cramer#diff-YXBwcy9hcGkvc3JjL2RiL3NjaGVtYS9lbnVtcy50cw==) | `100.00% <ø> (ø)` | | | [apps/api/src/routes/listFriends.ts](https://app.codecov.io/gh/dcramer/peated/pull/61?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Cramer#diff-YXBwcy9hcGkvc3JjL3JvdXRlcy9saXN0RnJpZW5kcy50cw==) | `95.45% <92.85%> (ø)` | | | [apps/api/src/routes/addFriend.ts](https://app.codecov.io/gh/dcramer/peated/pull/61?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Cramer#diff-YXBwcy9hcGkvc3JjL3JvdXRlcy9hZGRGcmllbmQudHM=) | `97.26% <97.26%> (ø)` | | | [apps/api/src/app.ts](https://app.codecov.io/gh/dcramer/peated/pull/61?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Cramer#diff-YXBwcy9hcGkvc3JjL2FwcC50cw==) | `92.07% <100.00%> (+7.92%)` | :arrow_up: | | [apps/api/src/db/schema/notifications.ts](https://app.codecov.io/gh/dcramer/peated/pull/61?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Cramer#diff-YXBwcy9hcGkvc3JjL2RiL3NjaGVtYS9ub3RpZmljYXRpb25zLnRz) | `100.00% <100.00%> (ø)` | | | [apps/api/src/lib/notifications.ts](https://app.codecov.io/gh/dcramer/peated/pull/61?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Cramer#diff-YXBwcy9hcGkvc3JjL2xpYi9ub3RpZmljYXRpb25zLnRz) | `69.11% <100.00%> (-19.12%)` | :arrow_down: | | [apps/api/src/lib/serializers/friend.ts](https://app.codecov.io/gh/dcramer/peated/pull/61?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Cramer#diff-YXBwcy9hcGkvc3JjL2xpYi9zZXJpYWxpemVycy9mcmllbmQudHM=) | `100.00% <100.00%> (ø)` | | | [apps/api/src/lib/serializers/notification.ts](https://app.codecov.io/gh/dcramer/peated/pull/61?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Cramer#diff-YXBwcy9hcGkvc3JjL2xpYi9zZXJpYWxpemVycy9ub3RpZmljYXRpb24udHM=) | `93.88% <100.00%> (+1.08%)` | :arrow_up: | | [apps/api/src/lib/serializers/user.ts](https://app.codecov.io/gh/dcramer/peated/pull/61?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Cramer#diff-YXBwcy9hcGkvc3JjL2xpYi9zZXJpYWxpemVycy91c2VyLnRz) | `98.52% <100.00%> (+0.02%)` | :arrow_up: | | [apps/api/src/routes/addTastingComment.ts](https://app.codecov.io/gh/dcramer/peated/pull/61?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Cramer#diff-YXBwcy9hcGkvc3JjL3JvdXRlcy9hZGRUYXN0aW5nQ29tbWVudC50cw==) | `89.06% <100.00%> (ø)` | | | ... and [5 more](https://app.codecov.io/gh/dcramer/peated/pull/61?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Cramer) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.