lib/rhosync/api/get_api_token.rb in rhosync-2.0.3 vs lib/rhosync/api/get_api_token.rb in rhosync-2.0.4
- old
+ new
@@ -1,5 +1,5 @@
-Rhosync::Server.api :get_api_token do |params,user|
+Server.api :get_api_token do |params,user|
if user and user.admin == 1 and user.token
user.token.value
else
raise ApiException.new(422, "Invalid/missing API user")
end
\ No newline at end of file