Skip to content

Instantly share code, notes, and snippets.

@rishavs
Created June 30, 2018 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rishavs/1a9660cf0e0b7a1ee94b91276c9b6a0d to your computer and use it in GitHub Desktop.
Save rishavs/1a9660cf0e0b7a1ee94b91276c9b6a0d to your computer and use it in GitHub Desktop.
module Cove
class Auth
def self.register(ctx)
params = Cove::Parse.form_params(ctx.request.body)
username = params.fetch("username")
password = params.fetch("password")
store = {
"status" => "success",
"message" => "User was success fully added",
"data" => {"userid" => "xxx", "username" => username}
}
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment