adjust response
This commit is contained in:
@@ -116,7 +116,19 @@ module Api
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
json = { submitters: json } if request.path.ends_with?('/init')
|
if request.path.ends_with?('/init')
|
||||||
|
json =
|
||||||
|
if submissions.size == 1
|
||||||
|
{
|
||||||
|
id: submissions.first.id,
|
||||||
|
submitters: json,
|
||||||
|
expire_at: submissions.first.expire_at,
|
||||||
|
created_at: submissions.first.created_at
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ submitters: json }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
json
|
json
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user