forked from mirror/pixelfed
Merge pull request #1151 from pixelfed/frontend-ui-refactor
Update ActivityPub helper
This commit is contained in:
commit
3ea853aa6a
|
@ -33,13 +33,13 @@ class Helpers {
|
||||||
$valid = Validator::make($data, [
|
$valid = Validator::make($data, [
|
||||||
'type' => [
|
'type' => [
|
||||||
'required',
|
'required',
|
||||||
|
'string',
|
||||||
Rule::in($verbs)
|
Rule::in($verbs)
|
||||||
],
|
],
|
||||||
'id' => 'required|string',
|
'id' => 'required|string',
|
||||||
'actor' => 'required|string|url',
|
'actor' => 'required|string|url',
|
||||||
'object' => 'required',
|
'object' => 'required',
|
||||||
'object.type' => 'required_if:type,Create',
|
'object.type' => 'required_if:type,Create',
|
||||||
'object.attachment' => 'required_if:type,Create',
|
|
||||||
'object.attributedTo' => 'required_if:type,Create|url',
|
'object.attributedTo' => 'required_if:type,Create|url',
|
||||||
'published' => 'required_if:type,Create|date'
|
'published' => 'required_if:type,Create|date'
|
||||||
])->passes();
|
])->passes();
|
||||||
|
|
Loading…
Reference in New Issue