File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ const getRunPoolElement = function (body: RunRequestBody, res: Response): RunPoo
92
92
* @apiParam {String(Base64)} source source code to run (encoded in base64)
93
93
* @apiParam {Enum} lang Language of code to execute
94
94
* @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`
95
97
*
96
98
* @apiUse AvailableLangs
97
99
*
@@ -100,14 +102,16 @@ const getRunPoolElement = function (body: RunRequestBody, res: Response): RunPoo
100
102
* @apiSuccess {String(Base64)} stderr Output of stderr of execution (encoded in base64)
101
103
* @apiSuccess {Number} statuscode Result of operation
102
104
*
103
- * @apiSuccessExample {JSON} Success-Response:
105
+ * @apiSuccessExample {JSON} Success-Response(mode=sync) :
104
106
* HTTP/1.1 200 OK
105
107
* {
106
108
* "id": 10,
107
109
* "statuscode": 0,
108
110
* "stdout": "NA0KMg0KMw=="
109
111
* "stderr": "VHlwZUVycm9y"
110
112
* }
113
+ * @apiSuccessExample {JSON} Success-Response(mode=callback):
114
+ * HTTP/1.1 200 OK
111
115
*/
112
116
route . post ( '/' , ( req , res , next ) => {
113
117
const invalidRequest = isInvalidRunRequest ( req )
You can’t perform that action at this time.
0 commit comments