Notes/Controllers/ApiController.cs
2024-01-06 21:10:06 -05:00

17 lines
443 B
C#

using Microsoft.AspNetCore.Mvc;
using BinaryDad.Notes.Services;
namespace BinaryDad.Notes.Controllers
{
[ApiController]
public class ApiController : ControllerBase
{
private readonly INoteService noteService;
public ApiController(INoteService noteService) => this.noteService = noteService;
[Route("note/{noteName}")]
public string Note(string noteName) => noteService.GetText(noteName);
}
}