fix: address review comments

This commit is contained in:
James Houlahan
2020-04-21 07:17:50 +00:00
parent febdf98349
commit 1457005f86
31 changed files with 88 additions and 104 deletions

View File

@ -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
}