mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-07 08:23:55 +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
@@ -56,7 +56,7 @@ export async function requestConnection(
|
||||
/**
|
||||
* Returns the current Google Sheets authentication status for this server session.
|
||||
*/
|
||||
export async function verifyAuthentication(
|
||||
export function verifyAuthentication(
|
||||
_req: Request,
|
||||
res: Response<{ authenticated: AuthenticationStatus } | ErrorResponse>,
|
||||
) {
|
||||
@@ -72,7 +72,7 @@ export async function verifyAuthentication(
|
||||
/**
|
||||
* Clears the current Google Sheets authentication session.
|
||||
*/
|
||||
export async function revokeAuthentication(
|
||||
export function revokeAuthentication(
|
||||
_req: Request,
|
||||
res: Response<{ authenticated: AuthenticationStatus } | ErrorResponse>,
|
||||
) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This is a feature specific router for integration with google sheets
|
||||
*/
|
||||
|
||||
import express from 'express';
|
||||
import express, { Router } from 'express';
|
||||
|
||||
import {
|
||||
getWorksheetMetadataFromSheet,
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
validateWorksheetMetadata,
|
||||
} from './sheets.validation.js';
|
||||
|
||||
export const router = express.Router();
|
||||
export const router: Router = express.Router();
|
||||
|
||||
router.get('/connect', verifyAuthentication);
|
||||
router.post('/:sheetId/connect', uploadClientSecret, validateRequestConnection, requestConnection);
|
||||
|
||||
Reference in New Issue
Block a user