|
1 | | -import betterSqlite3 from 'better-sqlite3'; |
2 | 1 | import express from 'express'; |
3 | | -import AdminForth, { AdminForthDataTypes, Filters, AdminForthResource, AdminForthResourceColumn } from 'adminforth'; |
| 2 | +import type { Request, Response } from 'express'; |
| 3 | +import AdminForth, { Filters } from 'adminforth'; |
| 4 | +import type { AdminUser } from 'adminforth'; |
4 | 5 | import fs from 'fs'; |
5 | 6 | import usersResource from "./resources/users"; |
6 | 7 | import apartmentsResource from "./resources/apartments"; |
7 | 8 | import auditLogsResource from "./resources/auditLogs" |
8 | 9 | import translations from "./resources/translations"; |
9 | 10 | import sessionsResource from './resources/agent_resources/sessions'; |
10 | 11 | import turnsResource from './resources/agent_resources/turns'; |
| 12 | +import checkpointsResource from './resources/agent_resources/checkpoints'; |
11 | 13 | import jobs_resource from './resources/jobs'; |
12 | 14 | import { randomUUID } from 'crypto'; |
13 | 15 | try { fs.mkdirSync('db') } catch (e) {} |
@@ -66,6 +68,7 @@ new AdminForth({ |
66 | 68 | translations, |
67 | 69 | sessionsResource, |
68 | 70 | turnsResource, |
| 71 | + checkpointsResource, |
69 | 72 | jobs_resource, |
70 | 73 | ], |
71 | 74 | menu: [ |
@@ -179,7 +182,7 @@ if (import.meta.url === `file://${process.argv[1]}`) { |
179 | 182 | }, |
180 | 183 | }, |
181 | 184 | admin.express.authorize( |
182 | | - async (req, res) => { |
| 185 | + async (req: Request, res: Response) => { |
183 | 186 | const db = admin.resource('aparts').dataConnector.client; |
184 | 187 | const days = req.body.days || 7; |
185 | 188 | const apartsByDays = await db.prepare( |
|
0 commit comments