refactor: replace api error handler with cosy err handler

This commit is contained in:
Jacky 2025-03-29 20:33:48 +08:00
parent 4cb4695e7b
commit b469ca7961
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
37 changed files with 268 additions and 250 deletions

View file

@ -1,12 +1,12 @@
package streams
import (
"github.com/0xJacky/Nginx-UI/api"
"net/http"
"github.com/0xJacky/Nginx-UI/internal/helper"
"github.com/0xJacky/Nginx-UI/internal/nginx"
"github.com/gin-gonic/gin"
"github.com/uozi-tech/cosy"
"net/http"
)
func Duplicate(c *gin.Context) {
@ -35,7 +35,7 @@ func Duplicate(c *gin.Context) {
_, err := helper.CopyFile(src, dst)
if err != nil {
api.ErrHandler(c, err)
cosy.ErrHandler(c, err)
return
}