Notes/Controllers/ApiController.cs

17 lines
443 B
C#
Raw Permalink Normal View History

using Microsoft.AspNetCore.Mvc;
using BinaryDad.Notes.Services;
namespace BinaryDad.Notes.Controllers
{
[ApiController]
public class ApiController : ControllerBase
{
private readonly INoteService noteService;
2023-07-28 18:52:53 +00:00
public ApiController(INoteService noteService) => this.noteService = noteService;
[Route("note/{noteName}")]
2024-05-08 01:43:09 +00:00
public string Note(string noteName) => noteService.GetNote(noteName);
}
}