|
@@ -131,7 +131,14 @@ func createTag(w http.ResponseWriter, r *http.Request) {
|
|
}
|
|
}
|
|
}()
|
|
}()
|
|
go mq.PublishPeerUpdate(false)
|
|
go mq.PublishPeerUpdate(false)
|
|
- logic.ReturnSuccessResponseWithJson(w, r, req, "created tag successfully")
|
|
|
|
|
|
+
|
|
|
|
+ var res models.TagListRespNodes = models.TagListRespNodes{
|
|
|
|
+ Tag: tag,
|
|
|
|
+ UsedByCnt: len(req.TaggedNodes),
|
|
|
|
+ TaggedNodes: req.TaggedNodes,
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ logic.ReturnSuccessResponseWithJson(w, r, res, "created tag successfully")
|
|
}
|
|
}
|
|
|
|
|
|
// @Summary Update Tag
|
|
// @Summary Update Tag
|
|
@@ -182,7 +189,14 @@ func updateTag(w http.ResponseWriter, r *http.Request) {
|
|
}
|
|
}
|
|
mq.PublishPeerUpdate(false)
|
|
mq.PublishPeerUpdate(false)
|
|
}()
|
|
}()
|
|
- logic.ReturnSuccessResponse(w, r, "updating tags")
|
|
|
|
|
|
+
|
|
|
|
+ var res models.TagListRespNodes = models.TagListRespNodes{
|
|
|
|
+ Tag: tag,
|
|
|
|
+ UsedByCnt: len(updateTag.TaggedNodes),
|
|
|
|
+ TaggedNodes: updateTag.TaggedNodes,
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ logic.ReturnSuccessResponseWithJson(w, r, res, "updated tags")
|
|
}
|
|
}
|
|
|
|
|
|
// @Summary Delete Tag
|
|
// @Summary Delete Tag
|