Created
March 8, 2023 04:30
-
-
Save kripz97/5695af3619022b8631782a5c5a0f56de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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