Skip to content

Commit 2c2e0b3

Browse files
committed
return submissionId for callback mode immediate response
1 parent 2d3189a commit 2c2e0b3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/routes/api/run.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ const getRunPoolElement = function (body: RunRequestBody, res: Response): RunPoo
128128
* }
129129
* @apiSuccessExample {JSON} Success-Response(mode=callback):
130130
* HTTP/1.1 200 OK
131+
* {
132+
* "id": 10
133+
* }
131134
*
132135
* @apiSuccessExample {JSON} Body for Callback(mode=callback):
133136
* HTTP/1.1 200 OK
@@ -169,7 +172,9 @@ route.post('/', (req, res, next) => {
169172

170173
switch (req.body.mode) {
171174
case 'callback':
172-
res.sendStatus(200)
175+
res.json({
176+
id: submission.id
177+
})
173178
}
174179

175180
}).catch(err => {

0 commit comments

Comments
 (0)