fix: get own user without listing workspace users - #302
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #302 +/- ##
==========================================
+ Coverage 31.46% 32.35% +0.88%
==========================================
Files 141 141
Lines 9016 9020 +4
==========================================
+ Hits 2837 2918 +81
+ Misses 6074 5988 -86
- Partials 105 114 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
672d651 to
4c0c845
Compare
| // listing workspace users requires admin rights | ||
| if me, err := c.GetMe(); err == nil && me.ID == p.UserID { | ||
| return me, nil | ||
| } |
There was a problem hiding this comment.
i think is better to revert this change, instead change here to use the GetMe method
i think i forgot about the GetMe when i did the GetUsersHydratedTimeEntries function
the revert is so that if someone is using the GetUser it does have to call the GetMe before going for the user they want
There was a problem hiding this comment.
Thanks, that makes more sense! I also removed the attempt at caching the call, I don't think it's worth it.
e7a5a8a to
16438c5
Compare
16438c5 to
a951d83
Compare
Suggestion to fix #301