mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-23 10:26:44 +00:00
fix: address review comments
This commit is contained in:
@ -65,7 +65,7 @@ func (api *FakePMAPI) Auth(username, password string, authInfo *pmapi.AuthInfo)
|
||||
auth := &pmapi.Auth{
|
||||
TwoFA: user.get2FAInfo(),
|
||||
RefreshToken: session.refreshToken,
|
||||
ExpiresIn: 86400,
|
||||
ExpiresIn: 86400, // seconds
|
||||
}
|
||||
auth.DANGEROUSLYSetUID(session.uid)
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ func (api *FakePMAPI) GetEvent(eventID string) (*pmapi.Event, error) {
|
||||
// Request for empty ID returns the latest event.
|
||||
if eventID == "" {
|
||||
if len(api.events) == 0 {
|
||||
return &pmapi.Event{EventID: ""}, nil
|
||||
return &pmapi.Event{EventID: "first-event-id"}, nil
|
||||
}
|
||||
return api.events[len(api.events)-1], nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user