|
@@ -18,7 +18,7 @@ func Version(r *GinRouter) {
|
|
|
r.GET("/versions", GetVersion)
|
|
|
r.GET("/version/latest", VersionLatest)
|
|
|
r.POSTJWT("/version/update", UpdateVersion)
|
|
|
- r.POSTJWT("/version/delete/:id", DeleteArticle)
|
|
|
+ r.POSTJWT("/version/delete/:id", DeleteVersion)
|
|
|
}
|
|
|
|
|
|
func GetVersion(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
@@ -75,7 +75,7 @@ func UpdateVersion(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
|
return repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionVersions, version.Id.Hex(), &version)
|
|
|
}
|
|
|
|
|
|
-func DeleteArticle(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
|
+func DeleteVersion(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
|
_id := c.Param("id")
|
|
|
id, _ := primitive.ObjectIDFromHex(_id)
|
|
|
if id.IsZero() {
|