17 lines
443 B
C#
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.GetNote(noteName);
|
|
}
|
|
}
|