Skip to content

Commit

Permalink
Merge pull request #10 from Ryanair/feature/change-status-to-forbidden
Browse files Browse the repository at this point in the history
new function to return forbidden
  • Loading branch information
somolinosm authored Sep 1, 2021
2 parents 5a3f532 + 2c462b3 commit 6293f9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ func ToUnauthorizedResponse(event events.APIGatewayV2HTTPRequest) events.APIGate
return ToResponseVoid(http.StatusUnauthorized)
}

func ToForbiddenResponse(event events.APIGatewayV2HTTPRequest) events.APIGatewayV2HTTPResponse {
return ToResponseVoid(http.StatusForbidden)
}

func ToNotFoundResponse(event events.APIGatewayV2HTTPRequest, message string) events.APIGatewayV2HTTPResponse {
return ToResponseWithBody(event, http.StatusNotFound, message)
}
Expand Down

0 comments on commit 6293f9d

Please sign in to comment.