This commit is contained in:
@@ -320,9 +320,9 @@ namespace AyaNova.Api.Controllers
|
||||
/// Untag all objects with this tag
|
||||
/// Required roles: BizAdminFull, DispatchFull, InventoryFull, TechFull, AccountingFull
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="id">TagId</param>
|
||||
/// <returns>Ok</returns>
|
||||
[HttpDelete("{id}")]
|
||||
[HttpPost("UntagAll/{id}")]
|
||||
public async Task<IActionResult> UnTagEverything([FromRoute] long id)
|
||||
{
|
||||
|
||||
@@ -352,9 +352,8 @@ namespace AyaNova.Api.Controllers
|
||||
//Instantiate the business object handler
|
||||
TagBiz biz = new TagBiz(ct, UserId, UserRolesFromContext.Roles(HttpContext.Items));
|
||||
|
||||
//NOTE: ct.SaveChanges not required after this call
|
||||
//Delete will look after it as it also needs to delete related records manully that are not mapped in EF Core
|
||||
if (!biz.Delete(dbObj))
|
||||
//Untag from all places
|
||||
if (!biz.Untag(dbObj))
|
||||
{
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
}
|
||||
|
||||
@@ -99,8 +99,8 @@ namespace AyaNova.Api.Controllers
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns>Paged id/name collection of TagGroups with paging data</returns>
|
||||
[HttpGet("PickList", Name = nameof(PickList))]
|
||||
public async Task<IActionResult> PickList([FromQuery] string q, [FromQuery] PagingOptions pagingOptions)
|
||||
[HttpGet("TagGroupPickList", Name = nameof(TagGroupPickList))]
|
||||
public async Task<IActionResult> TagGroupPickList([FromQuery] string q, [FromQuery] PagingOptions pagingOptions)
|
||||
{
|
||||
if (!serverState.IsOpen)
|
||||
{
|
||||
@@ -120,7 +120,7 @@ namespace AyaNova.Api.Controllers
|
||||
//Instantiate the business object handler
|
||||
TagGroupBiz biz = new TagGroupBiz(ct, UserIdFromContext.Id(HttpContext.Items), UserRolesFromContext.Roles(HttpContext.Items));
|
||||
|
||||
ApiPagedResponse<NameIdItem> pr = await biz.GetPickListAsync(Url, nameof(PickList), pagingOptions, q);
|
||||
ApiPagedResponse<NameIdItem> pr = await biz.GetPickListAsync(Url, nameof(TagGroupPickList), pagingOptions, q);
|
||||
return Ok(new ApiOkWithPagingResponse<NameIdItem>(pr));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user