refactor code structure (#1738)
This commit is contained in:
16
pkg/api/utils.go
Normal file
16
pkg/api/utils.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/emicklei/go-restful"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func HandleInternalError(response *restful.Response, err error) {
|
||||
statusCode := http.StatusInternalServerError
|
||||
|
||||
response.WriteError(statusCode, err)
|
||||
}
|
||||
|
||||
func HandleBadRequest(response *restful.Response, err error) {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user