Skip to content

Commit

Permalink
chore: remove getBodyBytes
Browse files Browse the repository at this point in the history
  • Loading branch information
kangmingtay committed Oct 28, 2024
1 parent b0b9035 commit 78393a9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/api/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ func isStringInSlice(checkValue string, list []string) bool {
return false
}

// getBodyBytes returns a byte array of the request's Body.
func getBodyBytes(req *http.Request) ([]byte, error) {
return utilities.GetBodyBytes(req)
}

type RequestParams interface {
AdminUserParams |
CreateSSOProviderParams |
Expand Down Expand Up @@ -97,7 +92,7 @@ type RequestParams interface {

// retrieveRequestParams is a generic method that unmarshals the request body into the params struct provided
func retrieveRequestParams[A RequestParams](r *http.Request, params *A) error {
body, err := getBodyBytes(r)
body, err := utilities.GetBodyBytes(r)
if err != nil {
return internalServerError("Could not read body into byte slice").WithInternalError(err)
}
Expand Down

0 comments on commit 78393a9

Please sign in to comment.