refactor db access
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2021-05-18 00:53:29 +02:00
parent 4b993aa4e8
commit 0bba2d2faf
8 changed files with 51 additions and 161 deletions

View File

@@ -1,5 +1,4 @@
using HanyadikHetVan.Data.Entities;
using HanyadikHetVan.Interface;
using HanyadikHetVan.Services;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
@@ -8,18 +7,15 @@ using System.Threading.Tasks;
namespace HanyadikHetVan.Controllers
{
[Route("api/pause")]
[Route("api/pauses")]
[ApiController]
public class PauseController
{
private readonly PauseService _pauseService;
private readonly IRepository<Pause> _pause;
public PauseController(IRepository<Pause> pause, PauseService pauseService)
public PauseController(PauseService pauseService)
{
_pauseService = pauseService;
_pause = pause;
}
[HttpPost]
public async Task<Object> AddPause([FromBody] Pause pause)