Add a cache system on the referential info
+ Add an identity service
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using AutoMapper;
|
||||
using Microsoft.AspNetCore.Cors;
|
||||
|
||||
using AutoMapper;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using skydiveLogs_api.DataContract;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.DomainBusiness.Interfaces;
|
||||
using skydiveLogs_api.DataContract;
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.Controllers
|
||||
{
|
||||
public class JumpController : Base
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public JumpController(IJumpService jumpService,
|
||||
IMapper mapper)
|
||||
{
|
||||
@@ -20,12 +19,24 @@ namespace skydiveLogs_api.Controllers
|
||||
_mapper = mapper;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
// DELETE: api/Jump/5
|
||||
[HttpDelete("{id}")]
|
||||
[EnableCors]
|
||||
public void Delete(int id)
|
||||
{
|
||||
_jumpService.DeleteJumpById(id);
|
||||
}
|
||||
|
||||
// GET: api/Jump
|
||||
[HttpGet]
|
||||
[EnableCors]
|
||||
public IEnumerable<JumpResp> Get()
|
||||
{
|
||||
var result = _jumpService.GetAllJumps(ConnectedUser);
|
||||
var result = _jumpService.GetAllJumps();
|
||||
|
||||
return _mapper.Map<IEnumerable<JumpResp>>(result);
|
||||
}
|
||||
@@ -48,8 +59,7 @@ namespace skydiveLogs_api.Controllers
|
||||
value.DropZoneId,
|
||||
value.JumpTypeId,
|
||||
value.GearId,
|
||||
_mapper.Map<Jump>(value),
|
||||
ConnectedUser);
|
||||
_mapper.Map<Jump>(value));
|
||||
}
|
||||
|
||||
// PUT: api/Jump/5
|
||||
@@ -60,15 +70,13 @@ namespace skydiveLogs_api.Controllers
|
||||
_jumpService.UpdateJump(id, _mapper.Map<Jump>(value));
|
||||
}
|
||||
|
||||
// DELETE: api/Jump/5
|
||||
[HttpDelete("{id}")]
|
||||
[EnableCors]
|
||||
public void Delete(int id)
|
||||
{
|
||||
_jumpService.DeleteJumpById(id);
|
||||
}
|
||||
#endregion Public Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private readonly IJumpService _jumpService;
|
||||
private readonly IMapper _mapper;
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user