lib/habitica_cli/commands/do.rb in habitica_cli-0.0.1 vs lib/habitica_cli/commands/do.rb in habitica_cli-0.1.0
- old
+ new
@@ -2,10 +2,10 @@
# Responsible for completing tasks
module Commands
def self.do(env, cache_ids)
items = cache_ids.map { |id| env.cache.get(id) }
items.each do |item|
- response = env.api.post("user/tasks/#{item['id']}/up")
+ response = env.api.post("tasks/#{item['id']}/score/up")
if response.success?
puts "Completed: #{item['text']}"
else
puts "Error #{response.body}"
end