Add a link betweend a gear to the connected user.
This commit is contained in:
@@ -25,7 +25,7 @@ namespace skydiveLogs_api.Controllers
|
||||
[EnableCors]
|
||||
public IEnumerable<GearResp> Get()
|
||||
{
|
||||
var result = _gearService.GetAllGears();
|
||||
var result = _gearService.GetAllGears(ConnectedUser);
|
||||
return _mapper.Map<IEnumerable<GearResp>>(result);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace skydiveLogs_api.Controllers
|
||||
[EnableCors]
|
||||
public void Post([FromBody] GearReq value)
|
||||
{
|
||||
_gearService.AddNewGear(_mapper.Map<Gear>(value));
|
||||
_gearService.AddNewGear(_mapper.Map<Gear>(value), ConnectedUser);
|
||||
}
|
||||
|
||||
// PUT: api/Gear/5
|
||||
|
||||
Reference in New Issue
Block a user