adjust response

This commit is contained in:
Pete Matsyburka committed 2025-01-02 22:42:02 +02:00
1 parent db60810272
commit 313d7f8408
1 file changed
+13 -1
+13 -1
View File
@@ -116,7 +116,19 @@ module Api
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
end