diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2022-02-11 09:55:35 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-02-11 09:55:35 +0200 |
| commit | 2cf0c5516a5693c534032fff9c9e9fb94d9f8e14 (patch) | |
| tree | 73d65f36d3a17d93165449061e071e639dbd7ab4 /src/index.ts | |
| parent | c1b9860963b5d98b89c890d9e3e552207b4e1371 (diff) | |
Allow empty source
Diffstat (limited to 'src/index.ts')
| -rw-r--r-- | src/index.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts index d1abded..1070915 100644 --- a/src/index.ts +++ b/src/index.ts @@ -38,7 +38,7 @@ app .use(json()) .post(RunnerApi.SubmitRequest.path, async (req, res) => { const body: RunnerApi.SubmitRequest.Body | undefined = req.body - if (!body || !body.source || body.source.length > MAX_SRC_LENGTH) { + if (!body || body.source === undefined || body.source.length > MAX_SRC_LENGTH) { return res.sendStatus(400) } |
