chore(auto): task completed - unknown

This commit is contained in:
MythEclipse
2026-06-13 14:24:09 +07:00
parent 1a195b737e
commit e6e34281ff
9 changed files with 184 additions and 61 deletions
@@ -25,5 +25,15 @@ export function createRecordingsRouter(): Router {
}),
);
// DELETE /api/recordings/:id
router.delete(
"/recordings/:id",
asyncHandler(async (req: Request, res: Response) => {
const { id } = req.params;
await recordingsService.deleteById(id);
res.json({ ok: true });
}),
);
return router;
}
@@ -42,6 +42,11 @@ export class RecordingsService {
return rows;
}
async deleteById(id: string): Promise<void> {
const db = getDatabase();
await db.execute(sql`DELETE FROM voice_recordings WHERE id = ${id}`);
}
}
export const recordingsService = new RecordingsService();