mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-14 04:52:17 +00:00
Merge branch 'spex/notification-types' into 'develop'
Spex: Add missing notification types to the api spec See merge request pleroma/pleroma!4141
This commit is contained in:
commit
a4bd89c77e
3 changed files with 13 additions and 1 deletions
0
changelog.d/notification-spex.skip
Normal file
0
changelog.d/notification-spex.skip
Normal file
|
@ -18,6 +18,8 @@ defmodule Pleroma.Web.ApiSpec.CastAndValidate do
|
|||
alias OpenApiSpex.Plug.PutApiSpec
|
||||
alias Plug.Conn
|
||||
|
||||
require Logger
|
||||
|
||||
@impl Plug
|
||||
def init(opts) do
|
||||
opts
|
||||
|
@ -51,6 +53,10 @@ defmodule Pleroma.Web.ApiSpec.CastAndValidate do
|
|||
conn
|
||||
|
||||
{:error, reason} ->
|
||||
Logger.error(
|
||||
"Strict ApiSpec: request denied to #{conn.path_info} with params #{inspect(conn.params)}"
|
||||
)
|
||||
|
||||
opts = render_error.init(reason)
|
||||
|
||||
conn
|
||||
|
|
|
@ -203,7 +203,10 @@ defmodule Pleroma.Web.ApiSpec.NotificationOperation do
|
|||
"move",
|
||||
"follow_request",
|
||||
"poll",
|
||||
"status"
|
||||
"status",
|
||||
"update",
|
||||
"admin.sign_up",
|
||||
"admin.report"
|
||||
],
|
||||
description: """
|
||||
The type of event that resulted in the notification.
|
||||
|
@ -218,6 +221,9 @@ defmodule Pleroma.Web.ApiSpec.NotificationOperation do
|
|||
- `pleroma:chat_mention` - Someone mentioned you in a chat message
|
||||
- `pleroma:report` - Someone was reported
|
||||
- `status` - Someone you are subscribed to created a status
|
||||
- `update` - A status you boosted has been edited
|
||||
- `admin.sign_up` - Someone signed up (optionally sent to admins)
|
||||
- `admin.report` - A new report has been filed
|
||||
"""
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue