Use real event data on vote page

This commit is contained in:
2020-04-13 23:29:40 -06:00
parent e964123131
commit f9b1ddeb5f
2 changed files with 28 additions and 9 deletions

View File

@ -134,7 +134,7 @@ func (s *Store) CreateEvent(ctx context.Context, cmd CreateEventCommand) (result
}
type GetEventQuery struct {
AlphaID, AdminCode string
AlphaID string
}
type GetEventResult struct {
@ -174,6 +174,7 @@ func (s *Store) GetEvent(ctx context.Context, query GetEventQuery) (GetEventResu
return GetEventResult{}, err
}
if !found {
// TODO return a constant or a specific error type for Not Found
return GetEventResult{}, errors.New("not found")
}
return result, nil