Implemented first pass of character and inventory services
This commit is contained in:
@ -26,7 +26,7 @@ func (s *itemsrvc) GetItem(ctx context.Context, p *item.GetItemPayload) (res *it
|
||||
|
||||
itemToGet := s.items[*p.ID]
|
||||
if itemToGet == nil {
|
||||
s.logger.Printf("itemToGet with id %d not found", p.ID)
|
||||
s.logger.Printf("item with id %d not found", &p.ID)
|
||||
return nil, errors.New("item not found")
|
||||
}
|
||||
res = s.items[*p.ID]
|
||||
@ -59,7 +59,7 @@ func (s *itemsrvc) UpdateItem(ctx context.Context, p *item.Item) (res *item.Item
|
||||
s.logger.Print("itemToGet.updateItem")
|
||||
itemToUpdate := s.items[*p.ID]
|
||||
if itemToUpdate == nil {
|
||||
s.logger.Printf("itemToGet with id %d not found", p.ID)
|
||||
s.logger.Printf("item with id %d not found", &p.ID)
|
||||
return nil, errors.New("item not found")
|
||||
}
|
||||
s.items[*p.ID] = p
|
||||
@ -73,7 +73,7 @@ func (s *itemsrvc) DeleteItem(ctx context.Context, p *item.DeleteItemPayload) (e
|
||||
s.logger.Print("item.deleteItem")
|
||||
itemToDelete := s.items[*p.ID]
|
||||
if itemToDelete == nil {
|
||||
s.logger.Printf("itemToGet with id %d not found", p.ID)
|
||||
s.logger.Printf("item with id %d not found", &p.ID)
|
||||
return errors.New("item not found")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user