Commit 5d519299 by liyijie

Fix valid! method to return true

parent e7d8e4f4
...@@ -126,6 +126,7 @@ module RailsApiAuthentication ...@@ -126,6 +126,7 @@ module RailsApiAuthentication
def valid! name, valid_code def valid! name, valid_code
raise(UserError.new(401, '-1', 'valid token is not correct')) unless valid?(name, valid_code) raise(UserError.new(401, '-1', 'valid token is not correct')) unless valid?(name, valid_code)
true
end end
private private
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment