fix(ci): resolve TS build errors across all services
- recordings.routes.ts: cast req.params.id to string (express 5 typed params) - recordings.service.ts: cast Record<string,unknown>[] via unknown first - guilds.routes.ts: cast req.params.guildId to string (2 sites) - transmitter.ts: capture pcmStream ref locally + re-acquire in drain callback Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,7 @@ export function createRecordingsRouter(): Router {
|
||||
router.delete(
|
||||
"/recordings/:id",
|
||||
asyncHandler(async (req: Request, res: Response) => {
|
||||
const { id } = req.params;
|
||||
const id = req.params.id as string;
|
||||
await recordingsService.deleteById(id);
|
||||
res.json({ ok: true });
|
||||
}),
|
||||
|
||||
@@ -68,7 +68,7 @@ export class RecordingsService {
|
||||
LIMIT ${limit + 1}
|
||||
`);
|
||||
|
||||
const items = rows.slice(0, limit) as RecordingRow[];
|
||||
const items = rows.slice(0, limit) as unknown as RecordingRow[];
|
||||
const hasMore = rows.length > limit;
|
||||
const nextCursor = hasMore ? String(items[items.length - 1]!.created_at) : null;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ export function createGuildsRouter(): Router {
|
||||
router.get(
|
||||
"/:guildId/channels",
|
||||
asyncHandler(async (req: Request, res: Response) => {
|
||||
const guildId = req.params.guildId;
|
||||
const guildId = req.params.guildId as string;
|
||||
logger.debug({ guildId }, "Fetching text channels");
|
||||
const channels = await getTextChannels(guildId);
|
||||
res.json(channels);
|
||||
@@ -38,7 +38,7 @@ export function createGuildsRouter(): Router {
|
||||
router.get(
|
||||
"/:guildId/voice-channels",
|
||||
asyncHandler(async (req: Request, res: Response) => {
|
||||
const guildId = req.params.guildId;
|
||||
const guildId = req.params.guildId as string;
|
||||
logger.debug({ guildId }, "Fetching voice channels");
|
||||
const channels = await getVoiceChannels(guildId);
|
||||
res.json(channels);
|
||||
|
||||
Reference in New Issue
Block a user