Changeset 1529
- Timestamp:
- 04/16/08 17:16:50 (4 weeks ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
hive/trunk/data_webapp/app/apis/hc_database_api.rb
r1454 r1529 19 19 api_method :get_broken_clients, :expects => [:string], :returns => [:string] 20 20 api_method :get_not_deleted_clients, :expects => [:string], :returns => [:string] 21 api_method :client_exists, :expects => [:string], :returns => [:string] 21 22 end hive/trunk/data_webapp/app/controllers/hc_database_controller.rb
r1519 r1529 314 314 RbYAML.dump(clients_hash) 315 315 end 316 317 # Indicates if the specified client ID is in the database. 318 def client_exists(obj_str) 319 obj_hash = RbYAML.load(obj_str) 320 cid = obj_hash.delete("client_id") 321 c = Client.find(:first, :conditions => {:cid => cid}) 322 if not c.nil? 323 return 1 324 else 325 return 0 326 end 327 end 328 316 329 end
