pipeline :http_signature do
plug(Pleroma.Web.Plugs.HTTPSignaturePlug)
+ plug(Pleroma.Web.Plugs.MappedSignatureToIdentityPlug)
end
scope "/api/pleroma", Pleroma.Web.TwitterAPI do
scope [] do
pipe_through(:oauth_write)
+ post("/change_email", UtilController, :change_email)
post("/change_password", UtilController, :change_password)
post("/delete_account", UtilController, :delete_account)
put("/notification_settings", UtilController, :update_notificaton_settings)
post("/blocks_import", UtilController, :blocks_import)
post("/follow_import", UtilController, :follow_import)
end
-
- scope [] do
- pipe_through(:oauth_read)
-
- post("/notifications/read", UtilController, :notifications_read)
- end
end
scope "/oauth", Pleroma.Web.OAuth do
scope [] do
pipe_through(:oauth_write)
patch("/conversations/:id", PleromaAPIController, :update_conversation)
+ post("/notifications/read", PleromaAPIController, :read_notification)
end
end
get("/scheduled_statuses", MastodonAPIController, :scheduled_statuses)
get("/scheduled_statuses/:id", MastodonAPIController, :show_scheduled_status)
- get("/lists", MastodonAPIController, :get_lists)
- get("/lists/:id", MastodonAPIController, :get_list)
- get("/lists/:id/accounts", MastodonAPIController, :list_accounts)
+ get("/lists", ListController, :index)
+ get("/lists/:id", ListController, :show)
+ get("/lists/:id/accounts", ListController, :list_accounts)
get("/domain_blocks", MastodonAPIController, :domain_blocks)
post("/media", MastodonAPIController, :upload)
put("/media/:id", MastodonAPIController, :update_media)
- delete("/lists/:id", MastodonAPIController, :delete_list)
- post("/lists", MastodonAPIController, :create_list)
- put("/lists/:id", MastodonAPIController, :rename_list)
+ delete("/lists/:id", ListController, :delete)
+ post("/lists", ListController, :create)
+ put("/lists/:id", ListController, :update)
- post("/lists/:id/accounts", MastodonAPIController, :add_to_list)
- delete("/lists/:id/accounts", MastodonAPIController, :remove_from_list)
+ post("/lists/:id/accounts", ListController, :add_to_list)
+ delete("/lists/:id/accounts", ListController, :remove_from_list)
post("/filters", MastodonAPIController, :create_filter)
get("/filters/:id", MastodonAPIController, :get_filter)
get("/timelines/tag/:tag", MastodonAPIController, :hashtag_timeline)
get("/timelines/list/:list_id", MastodonAPIController, :list_timeline)
+ get("/statuses", MastodonAPIController, :get_statuses)
get("/statuses/:id", MastodonAPIController, :get_status)
get("/statuses/:id/context", MastodonAPIController, :get_context)
get("/oauth_tokens", TwitterAPI.Controller, :oauth_tokens)
delete("/oauth_tokens/:id", TwitterAPI.Controller, :revoke_token)
+
+ scope [] do
+ pipe_through(:oauth_read)
+
+ post("/qvitter/statuses/notifications/read", TwitterAPI.Controller, :notifications_read)
+ end
end
pipeline :ap_service_actor do
scope "/", Pleroma.Web do
pipe_through(:ostatus)
+ pipe_through(:http_signature)
get("/objects/:uuid", OStatus.OStatusController, :object)
get("/activities/:uuid", OStatus.OStatusController, :activity)