Skip to content

Commit aca709a

Browse files
authored
fix: rollback @types/jsonwebtoken to 9.0.7
1 parent a9a840c commit aca709a

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@types/express": "4.17.22",
4545
"@types/html-to-text": "9.0.4",
4646
"@types/js-yaml": "4.0.9",
47-
"@types/jsonwebtoken": "9.0.9",
47+
"@types/jsonwebtoken": "9.0.7",
4848
"@types/morgan": "1.9.9",
4949
"@types/node": "22.15.30",
5050
"@types/node-cron": "3.0.11",

src/helpers/docker_queue.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import cron from "node-cron";
22
import Docker from "dockerode";
33
import jwt from "jsonwebtoken";
4-
import ms from "ms";
54
import yaml from "js-yaml";
65
import { Mutex } from "async-mutex";
76
import fs from "fs";
@@ -276,7 +275,7 @@ const docker_cron = async () => {
276275
team_label_binds: queue_front.team_label_binds,
277276
}
278277
const server_token = jwt.sign(payload, process.env.SECRET!, {
279-
expiresIn: ContConf.contest_image_map[contest_name].RUNNER_TOKEN_TIMEOUT as ms.StringValue,
278+
expiresIn: ContConf.contest_image_map[contest_name].RUNNER_TOKEN_TIMEOUT,
280279
});
281280
const container_server = await docker.createContainer({
282281
Image: ContConf.contest_image_map[contest_name].SERVER_IMAGE,

src/routes/code.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import express from "express";
22
import fs from "fs/promises";
33
import jwt from "jsonwebtoken";
4-
import ms from "ms";
54
import authenticate from "../middlewares/authenticate";
65
import * as utils from "../helpers/utils";
76
import * as COS from "../helpers/cos";
@@ -217,7 +216,7 @@ router.post("/compile-start", authenticate(), async (req, res) => {
217216
cos_path: cosPath,
218217
}
219218
const compiler_token = jwt.sign(payload, process.env.SECRET!, {
220-
expiresIn: ContConf.contest_image_map[contest_name].COMPILER_TIMEOUT as ms.StringValue,
219+
expiresIn: ContConf.contest_image_map[contest_name].COMPILER_TIMEOUT,
221220
});
222221

223222
const container = await docker.createContainer({

src/routes/user.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import bcrypt from "bcrypt";
22
import express from "express";
33
import jwt from "jsonwebtoken";
4-
import ms from "ms";
54
import { gql } from "graphql-request";
65
import { sendEmail } from "../helpers/email";
76
import { verifyEmailTemplate } from "../helpers/htmlTemplates";
@@ -158,7 +157,7 @@ router.post("/send-code", async(req, res) => {
158157
code: code,
159158
};
160159
const token = jwt.sign(payload, process.env.SECRET!, {
161-
expiresIn: ttl.toString()+"m" as ms.StringValue,
160+
expiresIn: ttl.toString()+"m",
162161
});
163162
if (email) {
164163
try{

0 commit comments

Comments
 (0)