Add a link betweend a gear to the connected user.
This commit is contained in:
@@ -15,8 +15,10 @@ namespace skydiveLogs_api.Business
|
||||
_gearRepository = gearRepository;
|
||||
}
|
||||
|
||||
public void AddNewGear(Gear newGear)
|
||||
public void AddNewGear(Gear newGear,
|
||||
User connectedUser)
|
||||
{
|
||||
newGear.User = connectedUser;
|
||||
_gearRepository.Add(newGear);
|
||||
}
|
||||
|
||||
@@ -30,9 +32,9 @@ namespace skydiveLogs_api.Business
|
||||
return _gearRepository.GetById(id);
|
||||
}
|
||||
|
||||
public IEnumerable<Gear> GetAllGears()
|
||||
public IEnumerable<Gear> GetAllGears(User connectedUser)
|
||||
{
|
||||
return _gearRepository.GetAll();
|
||||
return _gearRepository.GetAll(connectedUser);
|
||||
}
|
||||
|
||||
public void UpdateGear(int id, Gear Gear)
|
||||
|
||||
Reference in New Issue
Block a user