Refactoring

This commit is contained in:
syuilo 2017-04-23 15:55:37 +09:00
parent e086c68115
commit a3bd039bcf
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ export default async (endpoint: Endpoint, req: express.Request, res: express.Res
} }
if (ctx.app && endpoint.kind) { if (ctx.app && endpoint.kind) {
if (!ctx.app.permission.some((p: any) => p === endpoint.kind)) { if (!ctx.app.permission.some(p => p === endpoint.kind)) {
return reply(403, 'ACCESS_DENIED'); return reply(403, 'ACCESS_DENIED');
} }
} }

View File

@ -121,7 +121,7 @@ async function init(): Promise<Config> {
return config; return config;
} }
function spawnWorkers(onComplete: any) { function spawnWorkers(onComplete: Function) {
// Count the machine's CPUs // Count the machine's CPUs
const cpuCount = os.cpus().length; const cpuCount = os.cpus().length;