using Diary.Component.Entries.Service; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Diary.Component.Entries { [ApiController] [Route("[controller]")] public class EntriesController:ControllerBase { private readonly IEntryService _entryService; public EntriesController(IEntryService entryService) { _entryService = entryService ?? throw new ArgumentNullException(nameof(entryService)); } [HttpPost] public async Task CreateEntryAsync(CreateEntryResource create) { return await _entryService.CreateAsync(create); } } }