diff options
author | pdp8 <pdp8@pdp8.info> | 2023-12-22 17:41:49 +0100 |
---|---|---|
committer | pdp8 <pdp8@pdp8.info> | 2023-12-22 17:41:49 +0100 |
commit | 17fe7f0d25bc99285ddc3dbc153f1f3af9dca335 (patch) | |
tree | a660f2748a73f7e1b521dbf4a72c4f5d9929a5ae /client.rb | |
parent | 88518c5a4fa4fa9d841bb0d1c8add9fa2234530c (diff) |
create.rb: parse plain text
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 |