animeic-cd 1 year ago
parent
commit
42761d9eb2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/api/version.go

+ 2 - 2
src/api/version.go

@@ -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() {