mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-10 01:43:43 +00:00
refactor: small cleanups (#2059)
* refactor: remove unneeded async * chore: add express Router type to all routes * refactor: don't use index in react key * refactor: correctly get error message in excel route * refactor: avoid exporting muteable values
This commit is contained in:
committed by
GitHub
parent
23a44b2f04
commit
7c1d2f4554
@@ -1,7 +1,7 @@
|
||||
import type { IncomingMessage } from 'node:http';
|
||||
|
||||
import { parse as parseCookie } from 'cookie';
|
||||
import express, { type NextFunction, type Request, type Response } from 'express';
|
||||
import express, { Router, type NextFunction, type Request, type Response } from 'express';
|
||||
import type { WebSocket } from 'ws';
|
||||
|
||||
import { hasPassword, hashedPassword } from '../api-data/session/session.service.js';
|
||||
@@ -40,7 +40,7 @@ export function isPublicAssetRequest(originalUrl: string, prefix: string): boole
|
||||
* @param {string} prefix - Prefix is used for the client hashes in Ontime Cloud
|
||||
*/
|
||||
export function makeLoginRouter(prefix: string) {
|
||||
const router = express.Router();
|
||||
const router: Router = express.Router();
|
||||
|
||||
// serve static files at root
|
||||
router.use('/', express.static(srcFiles.login));
|
||||
|
||||
Reference in New Issue
Block a user