$id]); if (null === ($item = $this->db->find($entity))) { return api_error('Not found', HTTP_STATUS::HTTP_NOT_FOUND); } $item = array_pop($item)->getAll(); $item[iState::COLUMN_WATCHED] = $entity->isWatched(); $item[iState::COLUMN_UPDATED] = makeDate($entity->updated); return api_response($item, HTTP_STATUS::HTTP_OK, []); } }