Skip to content

Commit 50816db

Browse files
committed
the dawgs
1 parent 9dc4e19 commit 50816db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/routes/api/run.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ const getRunPoolElement = function (body: RunRequestBody, res: Response): RunPoo
9292
* @apiParam {String(Base64)} source source code to run (encoded in base64)
9393
* @apiParam {Enum} lang Language of code to execute
9494
* @apiParam {String(Base64)} input [Optional] stdin input for the program (encoded in base64)
95+
* @apiParam {Enum} mode [Optional] mode for request. Default = `sync`, see: https://github.com/coding-blocks/judge-api/issues/16
96+
* @apiParam {String)} callback [Optional] callback url for request. Required for `mode = callback`
9597
*
9698
* @apiUse AvailableLangs
9799
*
@@ -100,14 +102,16 @@ const getRunPoolElement = function (body: RunRequestBody, res: Response): RunPoo
100102
* @apiSuccess {String(Base64)} stderr Output of stderr of execution (encoded in base64)
101103
* @apiSuccess {Number} statuscode Result of operation
102104
*
103-
* @apiSuccessExample {JSON} Success-Response:
105+
* @apiSuccessExample {JSON} Success-Response(mode=sync):
104106
* HTTP/1.1 200 OK
105107
* {
106108
* "id": 10,
107109
* "statuscode": 0,
108110
* "stdout": "NA0KMg0KMw=="
109111
* "stderr": "VHlwZUVycm9y"
110112
* }
113+
* @apiSuccessExample {JSON} Success-Response(mode=callback):
114+
* HTTP/1.1 200 OK
111115
*/
112116
route.post('/', (req, res, next) => {
113117
const invalidRequest = isInvalidRunRequest(req)

0 commit comments

Comments
 (0)