| | |
| | | Route::for('content') |
| | | ->get([$this, 'getContent']) |
| | | ->auth(PermissionHandler::combine(['user', 'nonce', ['actionNonce'=>'dash-']])) |
| | | ->args([ |
| | | 'content' => 'string|required', |
| | | 'status' => 'string|default:all', |
| | | 'page' => 'integer|default:1|min:1', |
| | | 'per_page' => 'integer|default:30|min:1|max:100', |
| | | 'orderby' => 'string|enum:date,alphabetical|default:date', |
| | | 'order' => 'string|enum:asc,desc|default:desc', |
| | | 'search' => 'string', |
| | | 'date-filter' => 'string', |
| | | 'dateFrom' => 'string', |
| | | 'dateTo' => 'string', |
| | | ]) |
| | | ->rateLimit(20) |
| | | ->post([$this, 'postContent']) |
| | | ->auth(PermissionHandler::combine(['user', 'nonce', ['actionNonce'=>'dash-']])) |
| | | ->rateLimit(30); |
| | | ->rateLimit(30) |
| | | ->args([ |
| | | 'user' => 'int|required', |
| | | 'posts' => 'required', |
| | | 'content' => 'string', |
| | | ]); |
| | | } |
| | | |
| | | protected function initTimelineFields(string $content): void |
| | |
| | | return Response::success(['message'=>'No posts found in request']); |
| | | } |
| | | |
| | | |
| | | $count = count($data['posts']); |
| | | $operationId = $data['id']; |
| | | unset($data['user']); |