Add hint to rules
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
01a5f839c5
commit
ccc3ac241f
9 changed files with 50 additions and 15 deletions
|
|
@ -15,7 +15,8 @@ defmodule Pleroma.Web.AdminAPI.RuleView do
|
|||
%{
|
||||
id: to_string(rule.id),
|
||||
priority: rule.priority,
|
||||
text: rule.text
|
||||
text: rule.text,
|
||||
hint: rule.hint
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -182,7 +182,8 @@ defmodule Pleroma.Web.ApiSpec.Admin.ReportOperation do
|
|||
type: :object,
|
||||
properties: %{
|
||||
id: %Schema{type: :string},
|
||||
text: %Schema{type: :string}
|
||||
text: %Schema{type: :string},
|
||||
hint: %Schema{type: :string, nullable: true}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,8 @@ defmodule Pleroma.Web.ApiSpec.Admin.RuleOperation do
|
|||
required: [:text],
|
||||
properties: %{
|
||||
priority: %Schema{type: :integer},
|
||||
text: %Schema{type: :string}
|
||||
text: %Schema{type: :string},
|
||||
hint: %Schema{type: :string}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
|
@ -94,7 +95,8 @@ defmodule Pleroma.Web.ApiSpec.Admin.RuleOperation do
|
|||
type: :object,
|
||||
properties: %{
|
||||
priority: %Schema{type: :integer},
|
||||
text: %Schema{type: :string}
|
||||
text: %Schema{type: :string},
|
||||
hint: %Schema{type: :string}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
|
@ -105,7 +107,8 @@ defmodule Pleroma.Web.ApiSpec.Admin.RuleOperation do
|
|||
properties: %{
|
||||
id: %Schema{type: :string},
|
||||
priority: %Schema{type: :integer},
|
||||
text: %Schema{type: :string}
|
||||
text: %Schema{type: :string},
|
||||
hint: %Schema{type: :string, nullable: true}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -364,7 +364,8 @@ defmodule Pleroma.Web.ApiSpec.InstanceOperation do
|
|||
type: :object,
|
||||
properties: %{
|
||||
id: %Schema{type: :string},
|
||||
text: %Schema{type: :string}
|
||||
text: %Schema{type: :string},
|
||||
hint: %Schema{type: :string}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,8 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
|
|||
def render("rule.json", %{rule: rule}) do
|
||||
%{
|
||||
id: to_string(rule.id),
|
||||
text: rule.text
|
||||
text: rule.text,
|
||||
hint: rule.hint || ""
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue