-
Notifications
You must be signed in to change notification settings - Fork 138
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
Fix a lot of things about sharing #1130
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1130 +/- ##
=========================================
Coverage ? 85.17%
=========================================
Files ? 175
Lines ? 52193
Branches ? 0
=========================================
Hits ? 44456
Misses ? 6305
Partials ? 1432
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a lot of code duplication
if perm.Expired() {
return nil, ErrExpiredToken
}
return perm, nil
Permissions Set `json:"permissions,omitempty"` | ||
|
||
// XXX omitempty does not work for time.Time, thus the interface{} type | ||
ExpiresAt interface{} `json:"expires_at,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not using a *time.Time
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. I have copied what was done here: https://github.com/cozy/cozy-stack/blob/master/pkg/oauth/client.go#L63
No description provided.