Skip to content

Instantly share code, notes, and snippets.

@kripz97
Created March 8, 2023 04:30
Show Gist options
  • Save kripz97/5695af3619022b8631782a5c5a0f56de to your computer and use it in GitHub Desktop.
Save kripz97/5695af3619022b8631782a5c5a0f56de to your computer and use it in GitHub Desktop.
desc "Api to post user details " do
failure [
[500, "something went wrong, please try again later", Entity::Status]
]
success Entity::Status
end
params do
requires :customer_email, type: String, allow_blank: false, email: true, desc: "Customer Email", documentation: { param_type: 'body' }
requires :contact_no, type: String, allow_blank: false, mobilenumber: true,
desc: "Customer Phone Number", documentation: { param_type: 'body' }
end
post "/add_user_info" do
status = {code: true, subscribed: true, message: "User Details saved."}
status(200)
return status
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment