Commit 321d99e7 authored by Cédric OLIVIER's avatar Cédric OLIVIER
Browse files

fix: deprecated ioutil

parent 1f4d3539
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import (
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"net/http"
	"os"
@@ -616,7 +615,7 @@ func getObj(obj map[string]interface{}, keyPath string) (string, error) {
 * Check json format into request body
 */
func checkBody(request *http.Request) (int, []byte, error) {
	bodyStr, _ := ioutil.ReadAll(request.Body)
	bodyStr, _ := io.ReadAll(request.Body)
	if len(bodyStr) <= 0 {
		return http.StatusBadRequest, nil, fmt.Errorf("request body must not be empty")
	}