add missing path property handling
This commit is contained in:
@@ -13,10 +13,10 @@ func NewGameService(database dao.Database) *GameService {
|
||||
return &GameService{serviceContext{db: database}}
|
||||
}
|
||||
|
||||
func (gs *GameService) GetAGameById(id string) (*model.Game, error) {
|
||||
game, err := gs.db.GetGameById(id)
|
||||
func (gs *GameService) GetAGameByID(id string) (*model.Game, error) {
|
||||
game, err := gs.db.GetGameByID(id)
|
||||
if err != nil {
|
||||
if castedError, ok := err.(*dao.DAOError); ok {
|
||||
if castedError, ok := err.(*dao.Error); ok {
|
||||
switch castedError.Type {
|
||||
case dao.ErrTypeNotFound:
|
||||
return nil, &model.ErrNotFound
|
||||
|
||||
Reference in New Issue
Block a user