summaryrefslogtreecommitdiff
path: root/client.rb
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2023-07-29 20:59:48 +0200
committerpdp8 <pdp8@pdp8.info>2023-07-29 20:59:48 +0200
commitc50f749a2685a3e7608cec8730f5fe79de4676ac (patch)
tree75192aac75c86a6593737b1bdeb211f0799a5a8e /client.rb
parent3daf30b0a3837d3d8becb0baceed580e92403ce6 (diff)
POST /create
Diffstat (limited to 'client.rb')
-rw-r--r--client.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/client.rb b/client.rb
index 5ef721b..c2995f5 100644
--- a/client.rb
+++ b/client.rb
@@ -45,6 +45,7 @@ post '/follow' do
protected!
params['id'] = actor params['mention'] if params['mention']
outbox 'Follow', params['id'], [params['id']]
+ 200
end
post '/unfollow' do
@@ -55,6 +56,7 @@ post '/unfollow' do
activity ||= save_activity({ 'type' => 'Follow', 'actor' => ACTOR, 'object' => params['id'] }, OUTBOX) # recreate activity for old/deleted follows
outbox 'Undo', activity, [params['id']]
update_collection FOLLOWING, params['id'], true
+ 200
end
post '/share' do # TODO
@@ -72,6 +74,7 @@ end
post '/login' do
session['client'] = (OpenSSL::Digest::SHA256.base64digest(params['secret']) == File.read('.digest').chomp)
+ 200
end
helpers do