Created
July 12, 2018 12:55
-
-
Save mikebrind/f330718d98f90b3fa28d0f27ddee55e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using KnockoutTS.Models; | |
using KnockoutTS.Services; | |
using Microsoft.AspNetCore.Mvc; | |
namespace KnockoutTS.Controllers | |
{ | |
[Route("api/[controller]")] | |
public class MailController : Controller | |
{ | |
private readonly IMailService _mailService; | |
public MailController(IMailService mailService) | |
{ | |
_mailService = mailService; | |
} | |
[HttpGet, Route("getfolder")] | |
public Folder Get(string folder) | |
{ | |
return _mailService.GetMailByFolder(folder); | |
} | |
[HttpGet("{mailId:int}"), Route("getmail")] | |
public Mail Get(int mailId) | |
{ | |
return _mailService.GetMail(mailId); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment