Skip to content

Commit

Permalink
Change response data to JSON format in outcome.go
Browse files Browse the repository at this point in the history
In the outcome.go file, the response data has been changed from a simple input assignment to a JSON format. This change is achieved by marshalling the input using the json.Marshal function.
  • Loading branch information
iesreza committed Feb 11, 2024
1 parent 1823e16 commit 094962b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/outcome/outcome.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func Json(input any) *Response {
ContentType: fiber.MIMEApplicationJSONCharsetUTF8,
StatusCode: 200,
}
response.Data = input
response.Data, _ = json.Marshal(input)
return &response
}

Expand Down

0 comments on commit 094962b

Please sign in to comment.