This commit is contained in:
@@ -57,17 +57,15 @@ namespace AyaNova.Api.Controllers
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("new-count")]
|
||||
public ActionResult GetNewCount()
|
||||
public async Task<IActionResult> GetNewCount()
|
||||
{
|
||||
//STUB: https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3783
|
||||
if (serverState.IsClosed)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
System.Random rnd = new System.Random();
|
||||
int RandomNewCount = rnd.Next(20);
|
||||
return Ok(ApiOkResponse.Response(RandomNewCount));
|
||||
var UserId = UserIdFromContext.Id(HttpContext.Items);
|
||||
return Ok(ApiOkResponse.Response(await ct.Notification.CountAsync(z => z.UserId == UserId && z.Fetched == false)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user