This commit is contained in:
@@ -99,7 +99,40 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// V7 Import replace log entry
|
||||
/// (internal use only)
|
||||
/// </summary>
|
||||
/// <param name="inObj"></param>
|
||||
/// <param name="apiVersion">Automatically filled from route path, no need to specify in body</param>
|
||||
/// <returns></returns>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> PostV7Modify([FromBody] V7Event inObj, ApiVersion apiVersion)
|
||||
{
|
||||
if (!serverState.IsOpen)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
|
||||
//Only biz admin full users can do this
|
||||
if (!Authorized.HasAnyRole(HttpContext.Items, AuthorizationRoles.BizAdminFull))
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
|
||||
await EventLogProcessor.V7_Modify_LogAsync(inObj, ct);
|
||||
return NoContent();
|
||||
}
|
||||
public sealed class V7Event
|
||||
{
|
||||
public AyaType AyType { get; set; }
|
||||
public long AyId { get; set; }
|
||||
public long Creator { get; set; }
|
||||
public long Modifier { get; set; }
|
||||
public DateTime Created { get; set; }
|
||||
public DateTime Modified { get; set; }
|
||||
|
||||
}
|
||||
|
||||
//------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user