public function transform(Contest $contest)
{
$response = ['id' => $contest->id, 'name' => $contest->name, 'description' => $contest->description_voting, 'type' => $contest->type, 'header_url' => $contest->header_url, 'max_entries' => $contest->max_entries, 'max_votes' => $contest->max_votes, 'entry_starts_at' => json_time($contest->entry_starts_at), 'entry_ends_at' => json_time($contest->entry_ends_at), 'voting_ends_at' => json_time($contest->voting_ends_at), 'show_votes' => $contest->show_votes];
if ($contest->type === 'art') {
$response['shape'] = $contest->entry_shape;
}
return $response;
}