Browse Source

Merge branch 'bugfix/get_list_return_404' into 'develop'

MastodonAPI.MastodonAPIController: Return a 404 when we fail to get a list

See merge request pleroma/pleroma!755
tags/v0.9.9
Haelwenn 5 years ago
parent
commit
389e6a878a
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

+ 4
- 1
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex View File

@@ -905,7 +905,10 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
res = ListView.render("list.json", list: list)
json(conn, res)
else
_e -> json(conn, "error")
_e ->
conn
|> put_status(404)
|> json(%{error: "Record not found"})
end
end



Loading…
Cancel
Save