Skip to content

Commit

Permalink
Removed the validation and printed the payload.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmoud-Emad committed Dec 3, 2023
1 parent cbe14bd commit 2f08641
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,9 @@ pub fn (mut app VServerApp) preflight(path string) vweb.Result {
pub fn (mut app VServerApp) verify() vweb.Result {

app.add_header('Access-Control-Allow-Origin', '*')
app.set_status(200, "")
data := app.req.data
json2.decode[Payload](data) or {
app.set_status(400, "")
return app.json({
"Error": "true",
"message": "Please make sure that you sent a valid date.",
"required_fields": Payload{}.str(),
"status": '400'
})
}

println("Payload: ${data}")
return app.json({
"data": data
})
Expand Down

0 comments on commit 2f08641

Please sign in to comment.