Files
supabase/apps/studio/pages/api/get-utc-time.ts
Joshen Lim 7f5865872a Enforce noUnusedLocals and noUnusedParameters in tsconfig.json + fix all related issues (#45264)
## Context

Enforce `noUnusedLocals` and `noUnusedParameters` in tsconfig.json + fix
all related issues
2026-04-27 17:42:34 +08:00

12 lines
395 B
TypeScript

import { NextApiRequest, NextApiResponse } from 'next'
// Returns the current UTC time in ISO format. Used to check if the client and server time are skewed. Clock skew causes
// issues with JWT verification.
const handler = async (_req: NextApiRequest, res: NextApiResponse) => {
const utcTime = new Date().toISOString()
return res.status(200).json({ utcTime })
}
export default handler