Implement mastodon mutes endpoint
[akkoma] / lib / pleroma / web / router.ex
index 664f93c1c798d7318f93aed7b233a61c2a02cd3c..1b62d02ea334b8c8b3e118f6a85e09f07d473b98 100644 (file)
@@ -166,8 +166,8 @@ defmodule Pleroma.Web.Router do
     post("/accounts/:id/unfollow", MastodonAPIController, :unfollow)
     post("/accounts/:id/block", MastodonAPIController, :block)
     post("/accounts/:id/unblock", MastodonAPIController, :unblock)
-    post("/accounts/:id/mute", MastodonAPIController, :relationship_noop)
-    post("/accounts/:id/unmute", MastodonAPIController, :relationship_noop)
+    post("/accounts/:id/mute", MastodonAPIController, :mute)
+    post("/accounts/:id/unmute", MastodonAPIController, :unmute)
     get("/accounts/:id/lists", MastodonAPIController, :account_lists)
 
     get("/follow_requests", MastodonAPIController, :follow_requests)
@@ -178,7 +178,7 @@ defmodule Pleroma.Web.Router do
 
     get("/blocks", MastodonAPIController, :blocks)
 
-    get("/mutes", MastodonAPIController, :empty_array)
+    get("/mutes", MastodonAPIController, :mutes)
 
     get("/timelines/home", MastodonAPIController, :home_timeline)
 
@@ -392,6 +392,9 @@ defmodule Pleroma.Web.Router do
     get("/qvitter/mutes", TwitterAPI.Controller, :raw_empty_array)
 
     get("/externalprofile/show", TwitterAPI.Controller, :external_profile)
+
+    get("/oauth_tokens", TwitterAPI.Controller, :oauth_tokens)
+    delete("/oauth_tokens/:id", TwitterAPI.Controller, :revoke_token)
   end
 
   pipeline :ap_relay do