Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
authorlain <lain@soykaf.club>
Thu, 21 May 2020 13:35:13 +0000 (15:35 +0200)
committerlain <lain@soykaf.club>
Thu, 21 May 2020 13:35:13 +0000 (15:35 +0200)
1  2 
lib/pleroma/web/router.ex

index 89db2eebd5beb73ccac34c83998374afa1864182,cbe320746f0b37638eb2824c3b6ab6734395bf94..cd742a0324726976e84b08e9c1c0afd369dfc6a8
@@@ -306,30 -306,14 +306,22 @@@ defmodule Pleroma.Web.Router d
      scope [] do
        pipe_through(:authenticated_api)
  
-     end
-     scope [] do
-       pipe_through(:authenticated_api)
 +      post("/chats/by-account-id/:id", ChatController, :create)
 +      get("/chats", ChatController, :index)
 +      get("/chats/:id", ChatController, :show)
 +      get("/chats/:id/messages", ChatController, :messages)
 +      post("/chats/:id/messages", ChatController, :post_chat_message)
 +      delete("/chats/:id/messages/:message_id", ChatController, :delete_message)
 +      post("/chats/:id/read", ChatController, :mark_as_read)
-       get("/conversations/:id/statuses", PleromaAPIController, :conversation_statuses)
-       get("/conversations/:id", PleromaAPIController, :conversation)
-       post("/conversations/read", PleromaAPIController, :mark_conversations_as_read)
-     end
-     scope [] do
-       pipe_through(:authenticated_api)
 +
+       get("/conversations/:id/statuses", ConversationController, :statuses)
+       get("/conversations/:id", ConversationController, :show)
+       post("/conversations/read", ConversationController, :mark_as_read)
+       patch("/conversations/:id", ConversationController, :update)
  
-       patch("/conversations/:id", PleromaAPIController, :update_conversation)
-       put("/statuses/:id/reactions/:emoji", PleromaAPIController, :react_with_emoji)
-       delete("/statuses/:id/reactions/:emoji", PleromaAPIController, :unreact_with_emoji)
-       post("/notifications/read", PleromaAPIController, :mark_notifications_as_read)
+       put("/statuses/:id/reactions/:emoji", EmojiReactionController, :create)
+       delete("/statuses/:id/reactions/:emoji", EmojiReactionController, :delete)
+       post("/notifications/read", NotificationController, :mark_as_read)
  
        patch("/accounts/update_avatar", AccountController, :update_avatar)
        patch("/accounts/update_banner", AccountController, :update_banner)