mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-07 16:33:51 +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,5 +1,5 @@
|
||||
import express from 'express';
|
||||
import type { Request, Response } from 'express';
|
||||
import type { Request, Response, Router } from 'express';
|
||||
import { matchedData } from 'express-validator';
|
||||
import { deepEqual } from 'fast-equals';
|
||||
import { ErrorResponse, PortInfo, RefetchKey, Settings } from 'ontime-types';
|
||||
@@ -11,7 +11,7 @@ import { portManager } from '../../classes/port-manager/PortManager.js';
|
||||
import * as appState from '../../services/app-state-service/AppStateService.js';
|
||||
import { validateSettings, validateWelcomeDialog, validateServerPort } from './settings.validation.js';
|
||||
|
||||
export const router = express.Router();
|
||||
export const router: Router = express.Router();
|
||||
|
||||
router.post('/welcomedialog', validateWelcomeDialog, async (req: Request, res: Response) => {
|
||||
const show = await appState.setShowWelcomeDialog(req.body.show);
|
||||
|
||||
Reference in New Issue
Block a user