Esempio n. 1
0
 /**
  * Get comments for moderation.
  *
  * @param  array     $args
  * @param  \Vinelab\Minion\Dictionary $data
  *
  * @return array
  * @throws UnAuthorizedException If the provided access token was not valid.
  */
 public function getForModeration($args, Dictionary $data)
 {
     if (TokenAuth::isModerator($data->access_token)) {
         return Api::content(['CommentMapper', 'mapForModeration'], $this->comments->getForModeration($data->offset), $this->comments->total());
     }
     throw new UnAuthorizedException();
 }