diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2022-02-07 16:49:37 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-02-07 16:49:37 +0200 |
| commit | fdc97533885d95b2dff02e40014c654f79091b5b (patch) | |
| tree | ba2a67df09c99d8aad294a6a49143c20c9a5fd4b /src | |
| parent | c7d1061fd7fec2c21504c5d937766f72eb385130 (diff) | |
Fix types
Diffstat (limited to 'src')
| -rw-r--r-- | src/index.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/index.ts b/src/index.ts index a5128b3..5621c8c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,7 +5,7 @@ import { promisify } from "util" import { exec as cb_exec } from "child_process" import tmp from "tmp" import fs from "fs" -import { RunnerApiSubmitRequest, RunnerApiSubmitResponse } from "slam-types" +import { RunnerApi } from "slam-types" import { cors } from "@tinyhttp/cors" const exec = promisify(cb_exec) @@ -31,8 +31,8 @@ app })) .use(cors()) .use(json()) - .post(RunnerApiSubmitRequest.path, async (req, res) => { - const body: RunnerApiSubmitRequest.Body | undefined = req.body + .post(RunnerApi.SubmitRequest.path, async (req, res) => { + const body: RunnerApi.SubmitRequest.Body | undefined = req.body if (!body || !body.source) { return res.sendStatus(400) } @@ -43,7 +43,7 @@ app const result = await interpretFile(sourceFile) fs.rmSync(sourceFile) - const response: RunnerApiSubmitResponse.Body = { result } + const response: RunnerApi.SubmitResponse.Body = { result } res.send(response) }) .listen(PORT) |
