diff --git a/server/AyaNova/Controllers/TagController.cs b/server/AyaNova/Controllers/TagController.cs
index cbb85ae9..14980069 100644
--- a/server/AyaNova/Controllers/TagController.cs
+++ b/server/AyaNova/Controllers/TagController.cs
@@ -77,10 +77,11 @@ namespace AyaNova.Api.Controllers
/// Bulk add tags to objects
///
/// Required
- /// Required
+ /// Required
+ /// Required
/// Number of items affected
- [HttpPost("bulk-add/{ayaType}")]
- public async Task BulkAdd([FromRoute] AyaType ayaType, [FromBody] TagUtil.BulkTagOpParameter tagOpParams)
+ [HttpPost("bulk-add/{ayaType}/{tag}")]
+ public async Task BulkAdd([FromRoute] AyaType ayaType, [FromRoute] string tag, [FromBody] List idList)
{
if (!serverState.IsOpen)
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
@@ -88,7 +89,7 @@ namespace AyaNova.Api.Controllers
return BadRequest(new ApiErrorResponse(ModelState));
if (!Authorized.HasModifyRole(HttpContext.Items, ayaType))
return StatusCode(403, new ApiNotAuthorizedResponse());
- return Ok(ApiOkResponse.Response(await TagUtil.BulkAdd(ayaType, tagOpParams, ct), true));
+ return Ok(ApiOkResponse.Response(await TagUtil.BulkAdd(ayaType, tag, idList, ct), true));
}
diff --git a/server/AyaNova/biz/TagUtil.cs b/server/AyaNova/biz/TagUtil.cs
index 49add26e..77d922b3 100644
--- a/server/AyaNova/biz/TagUtil.cs
+++ b/server/AyaNova/biz/TagUtil.cs
@@ -215,7 +215,7 @@ namespace AyaNova.Biz
//BULK OPS
//
- public static async Task BulkAdd(AyaType ayaType, BulkTagOpParameter tagOpParams, AyContext ct)
+ public static async Task BulkAdd(AyaType ayaType, string tag, List idList, AyContext ct)
{
//todo iterate the object in question, open and update and save each one through it's biz object interface so rules etc are all maintained
//not sure if should update locked or read only objects, probably not I guess as it should only do whatever was done in interface
@@ -224,9 +224,8 @@ namespace AyaNova.Biz
}
- public class BulkTagOpParameter
- {
- public string NewTag { get; set; }
+ public class ObjectIdList
+ {
public List ObjectIds { get; set; }
}