ayType aytype all now AyaType or ayaType

This commit is contained in:
2020-05-15 21:08:37 +00:00
parent 7806e0df26
commit 8f3118d309
11 changed files with 77 additions and 42 deletions

View File

@@ -114,6 +114,7 @@ namespace AyaNova.Api.Controllers
if (serverState.IsClosed)
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
//since this is for opening an entire object it's appropriate to check if they have read full role first
if (!Authorized.HasReadFullRole(HttpContext.Items, ayaType))
return StatusCode(403, new ApiNotAuthorizedResponse());
@@ -140,11 +141,8 @@ namespace AyaNova.Api.Controllers
}
// var res = await Search.GetInfoAsync(ct, UserTranslationIdFromContext.Id(HttpContext.Items),
// UserRolesFromContext.Roles(HttpContext.Items), UserIdFromContext.Id(HttpContext.Items), phrase, max, ayaType, id);
return Ok(ApiOkResponse.Response(res, true));
}
}
//------------