Ensure non-null bio.
[akkoma] / lib / pleroma / web / router.ex
index 9e725641dc045ced9475f96fc6caca881fc00e6e..0bd8e40c4a28c251cc93617a6ac081c2676058db 100644 (file)
@@ -39,23 +39,12 @@ defmodule Pleroma.Web.Router do
     post "/token", OAuthController, :token_exchange
   end
 
-  scope "/api/v1", Pleroma.Web.MastodonAPI do
-    pipe_through :api
-    get "/instance", MastodonAPIController, :masto_instance
-    post "/apps", MastodonAPIController, :create_app
-
-    get "/timelines/public", MastodonAPIController, :public_timeline
-
-    get "/statuses/:id", MastodonAPIController, :get_status
-    get "/statuses/:id/context", MastodonAPIController, :get_context
-
-    get "/accounts/:id/statuses", MastodonAPIController, :user_statuses
-  end
-
   scope "/api/v1", Pleroma.Web.MastodonAPI do
     pipe_through :authenticated_api
 
     get "/accounts/verify_credentials", MastodonAPIController, :verify_credentials
+    get "/accounts/relationships", MastodonAPIController, :relationships
+
     get "/timelines/home", MastodonAPIController, :home_timeline
 
     post "/statuses", MastodonAPIController, :post_status
@@ -65,7 +54,21 @@ defmodule Pleroma.Web.Router do
     post "/statuses/:id/favourite", MastodonAPIController, :fav_status
     post "/statuses/:id/unfavourite", MastodonAPIController, :unfav_status
 
-    get "/notifications", MastodonAPIController, :empty_array
+    get "/notifications", MastodonAPIController, :notifications
+  end
+
+  scope "/api/v1", Pleroma.Web.MastodonAPI do
+    pipe_through :api
+    get "/instance", MastodonAPIController, :masto_instance
+    post "/apps", MastodonAPIController, :create_app
+
+    get "/timelines/public", MastodonAPIController, :public_timeline
+
+    get "/statuses/:id", MastodonAPIController, :get_status
+    get "/statuses/:id/context", MastodonAPIController, :get_context
+
+    get "/accounts/:id/statuses", MastodonAPIController, :user_statuses
+    get "/accounts/:id", MastodonAPIController, :user
   end
 
   scope "/api", Pleroma.Web do