mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 14:42:33 -05:00
adjust response
This commit is contained in:
1 parent
db60810272
commit
313d7f8408
1 file changed
+13
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user