app/controllers/subscribers_controller.rb
# POST /signup
# return authenticated token upon signup
POST /signup
return authenticated token upon signup
POST / signup return authenticated token upon signup
def create
    subscriber = Subscriber.create!(subscriber_params)
    auth_token =
      AuthenticateSubscriber.new(
        subscriber.login,
        subscriber.password
      ).call
    response = { message: Message.account_created, auth_token: auth_token }
    json_response(response, :created)
  end
def create subscriber = Subscriber . create! ( subscriber_params ) auth_token = AuthenticateSubscriber . new ( subscriber . login , subscriber . password ) . call response = { message : Message . account_created , auth_token : auth_token } json_response ( response , :created ) end
POST /signup
return authenticated token upon signup
POST / signup return authenticated token upon signup