mirror of
https://github.com/wahyd4/libr-2.git
synced 2026-08-09 05:15:53 +10:00
make sign up works
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
class Api::V1::RegistrationsController < ApplicationController
|
||||
skip_before_action :verify_authenticity_token
|
||||
class Api::V1::RegistrationsController < Api::V1::ApplicationController
|
||||
skip_before_action :authenticate_user_from_token
|
||||
|
||||
respond_to :json
|
||||
|
||||
def create
|
||||
|
||||
+7
-7
@@ -21,6 +21,13 @@ class User < ActiveRecord::Base
|
||||
User.where(id: user_ids)
|
||||
end
|
||||
|
||||
def active_auth_token
|
||||
if auth_tokens.empty?
|
||||
generate_auth_key
|
||||
end
|
||||
auth_tokens.first.value
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_name
|
||||
@@ -38,13 +45,6 @@ class User < ActiveRecord::Base
|
||||
AuthToken.generate_token_for self
|
||||
end
|
||||
|
||||
def active_auth_token
|
||||
if auth_tokens.empty?
|
||||
generate_auth_key
|
||||
end
|
||||
auth_tokens.first.value
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user