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

@@ -56,7 +56,7 @@ namespace AyaNova.Api.Controllers
if (serverState.IsClosed)
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
if (!Authorized.HasReadFullRole(HttpContext.Items, opt.AyType))
if (!Authorized.HasReadFullRole(HttpContext.Items, opt.AyaType))
{
return StatusCode(403, new ApiNotAuthorizedResponse());
}
@@ -125,7 +125,7 @@ namespace AyaNova.Api.Controllers
}
public sealed class V7Event
{
public AyaType AyType { get; set; }
public AyaType AyaType { get; set; }
public long AyId { get; set; }
public long Creator { get; set; }
public long Modifier { get; set; }
@@ -140,7 +140,7 @@ namespace AyaNova.Api.Controllers
public sealed class EventLogOptions
{
[FromQuery]
public AyaType AyType { get; set; }
public AyaType AyaType { get; set; }
[FromQuery]
public long AyId { get; set; }
[FromQuery]

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));
}
}
//------------