From 17fe7f0d25bc99285ddc3dbc153f1f3af9dca335 Mon Sep 17 00:00:00 2001 From: pdp8 Date: Fri, 22 Dec 2023 17:41:49 +0100 Subject: create.rb: parse plain text --- client.rb | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'client.rb') diff --git a/client.rb b/client.rb index e0a5746..d19c6fc 100644 --- a/client.rb +++ b/client.rb @@ -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 -- cgit v1.2.3