This commit is contained in:
@@ -100,6 +100,9 @@ namespace AyaNova.Api.Controllers
|
|||||||
if (!Authorized.HasModifyRole(HttpContext.Items, AyaType.OpsNotificationSettings))//technically maybe this could be wider open, but for now keeping as locked down
|
if (!Authorized.HasModifyRole(HttpContext.Items, AyaType.OpsNotificationSettings))//technically maybe this could be wider open, but for now keeping as locked down
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
var res = await CoreJobNotify.TestSMTPDelivery(toAddress);
|
var res = await CoreJobNotify.TestSMTPDelivery(toAddress);
|
||||||
|
if(res!="ok"){
|
||||||
|
return StatusCode(500, new ApiErrorResponse(ApiErrorCode.API_SERVER_ERROR, null, res));
|
||||||
|
}
|
||||||
return Ok(ApiOkResponse.Response(res));
|
return Ok(ApiOkResponse.Response(res));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user