read not
This commit is contained in:
@@ -18,8 +18,9 @@ namespace Back.Controllers
|
||||
private readonly MobileValidation _mobilevalidation;
|
||||
private readonly ServValidatinMsg _servValidatinMsg;
|
||||
private readonly servSendMsg _servSendMsg;
|
||||
private readonly servNotification _servNotification;
|
||||
public UserController(servUser servUser, MobileValidation mobilevalidation, servCompany servCompany
|
||||
, ServValidatinMsg servValidatinMsg, servSendMsg servSendMsg)
|
||||
, ServValidatinMsg servValidatinMsg, servSendMsg servSendMsg, servNotification servNotification)
|
||||
{
|
||||
|
||||
_servUser = servUser;
|
||||
@@ -27,6 +28,7 @@ namespace Back.Controllers
|
||||
_servCompany = servCompany;
|
||||
_servValidatinMsg = servValidatinMsg;
|
||||
_servSendMsg = servSendMsg;
|
||||
_servNotification = servNotification;
|
||||
}
|
||||
[HttpPost("authenticate")]
|
||||
[AllowAnonymous]
|
||||
@@ -92,6 +94,15 @@ namespace Back.Controllers
|
||||
return Ok(await _servUser.GetDashBoard(Convert.ToInt32(UserID)));
|
||||
|
||||
}
|
||||
[HttpPut("ReadNotification/{ntID}")]
|
||||
public async Task<ActionResult<bool>> ReadNotification(int ntID)
|
||||
{
|
||||
var claim = HttpContext.User.Claims.First(c => c.Type == "UserID");
|
||||
var UserID = claim.Value;
|
||||
return Ok(await _servNotification.ReadNotification(Convert.ToInt32(UserID), ntID));
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user