Parcourir la source

fix: stream is not deleted actually

倪天华 il y a 1 an
Parent
commit
7b25eb4d27
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      api/streams/streams.go

+ 5 - 0
api/streams/streams.go

@@ -345,6 +345,11 @@ func DeleteStream(c *gin.Context) {
 		return
 	}
 
+	if err = os.Remove(availablePath); err != nil {
+		api.ErrHandler(c, err)
+		return
+	}
+
 	c.JSON(http.StatusOK, gin.H{
 		"message": "ok",
 	})