using Microsoft.AspNetCore.Mvc;
using GxPress.Service.Interface.Reply;
using System.Threading.Tasks;
using System.Collections.Generic;
using GxPress.Request.Reply;
using GxPress.Result.Reply;
using GxPress.Auth;
using Microsoft.AspNetCore.Authorization;
namespace GxPress.Api.AppControllers
{
///
/// 回复我的
///
[Route("api/app/reply")]
[ApiController]
[Authorize]
public class ReplyController : Controller
{
private readonly IReplyService replyService;
private readonly ILoginContext _loginContext;
public ReplyController(IReplyService replyService, ILoginContext _loginContext)
{
this.replyService = replyService;
this._loginContext = _loginContext;
}
///
/// 获取回复我的笔记或者话题
///
///
///
[HttpPost("list")]
public async Task> GetReplyNoteOrTopicResults(ReplyRequest request)
{
request.UserId = _loginContext.AccountId;
return await replyService.GetReplyNoteOrTopicResults(request);
}
///
/// 获取我收到的赞
///
///
///
[HttpPost("praise")]
public async Task> GetPraiseAsync(ReplyRequest request)
{
request.UserId = _loginContext.AccountId;
return await replyService.GetPraiseAsync(request);
}
}
}