diff options
Diffstat (limited to 'client.rb')
-rw-r--r-- | client.rb | 26 |
1 files changed, 0 insertions, 26 deletions
@@ -1,20 +1,4 @@ # client-server -# ['/inbox/object', '/outbox/object'].each do |path| -# get path do -# protected! -# Dir[File.join(path.sub('/', ''), '*', '*.json')].collect { |f| JSON.load_file(f) }.to_json -# end -# end - -# post '/delete' do -# protected! -# params['id'].each do |id| -# file, object = find_object id -# halt 404 unless file and File.exist?(file) -# FileUtils.rm(file) -# end -# 200 -# end post '/follow' do protected! @@ -41,19 +25,9 @@ end post '/announce' do # TODO protected! - # src, object = find_object params['id'] - # object = JSON.load_file(src) - # to = ['https://www.w3.org/ns/activitystreams#Public', FOLLOWERS_URL] - # to << object['attributedTo'] - # create_activity 'Announce', object, to - # src, object = find_object params['id'] - # object = JSON.load_file(src) to = ['https://www.w3.org/ns/activitystreams#Public', FOLLOWERS_URL] to << params['attributedTo'] create_activity 'Announce', params['id'], to - # dest = src.sub('inbox/', 'outbox/') - # FileUtils.mkdir_p File.dirname(dest) - # FileUtils.rm src 200 end |