Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Commit

Permalink
type checks
Browse files Browse the repository at this point in the history
  • Loading branch information
alkihis committed Jun 4, 2020
1 parent 672c5fb commit 9cd55a8
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 76 deletions.
135 changes: 72 additions & 63 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@
"author": "",
"dependencies": {
"@types/cors": "^2.8.6",
"@types/express": "^4.17.3",
"@types/express": "^4.17.6",
"@types/express-jwt": "0.0.42",
"@types/jsonwebtoken": "^8.3.8",
"@types/mongoose": "^5.7.3",
"@types/node": "^13.9.0",
"@types/socket.io": "^2.1.4",
"@types/jsonwebtoken": "^8.5.0",
"@types/mongoose": "^5.7.21",
"@types/node": "^13.13.9",
"@types/socket.io": "^2.1.8",
"@types/spdy": "^3.4.4",
"@types/uuid": "^3.4.8",
"@types/uuid": "^3.4.9",
"body-parser": "^1.19.0",
"commander": "^3.0.2",
"cookie-parser": "^1.4.4",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
"express": "^4.17.1",
"express-jwt": "^5.3.1",
"express-jwt": "^5.3.3",
"express-mongo-sanitize": "^1.3.2",
"jsonwebtoken": "^8.5.1",
"mongoose": "^5.9.3",
"mongoose": "^5.9.17",
"socket.io": "^2.3.0",
"timerize": "^1.0.3",
"twitter-d": "^0.4.0",
Expand Down
2 changes: 1 addition & 1 deletion src/api/batch/dm_media_proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function getImageFromUrl(url: string, req: Request, res: Response) {
route.get('/', (req, res) => {
// Download a single image from Twitter
if (req.user && req.query && req.query.url) {
const url: string = req.query.url;
const url: string = req.query.url as string;

// Get URL from Twitter
getImageFromUrl(url, req, res).catch(e => {
Expand Down
5 changes: 3 additions & 2 deletions src/api/tasks/task_worker/WorkerTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ export default class WorkerTaskMaker {
fn = user.get.bind(user);
}

this.task_maker = id => {
this.task_maker = async id => {
const { endpoint, parameters } = starter.request(id);
return fn(endpoint, parameters);
const res = await fn(endpoint, parameters);
return res;
};
}

Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ if (commander.logLevel) {
}

const app = express();
http_base.globalAgent.maxSockets = Infinity;
https_base.globalAgent.maxSockets = Infinity;

let redirector: express.Express;
let http_server: http_base.Server | https_base.Server;
Expand Down
Loading

0 comments on commit 9cd55a8

Please sign in to comment.