mirror of
https://github.com/freedbygrace/ActiveDirectoryManager.git
synced 2026-08-09 10:20:39 +00:00
Add ability to update manager for Active Directory users.
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/4557185a-6c8f-4519-939e-2acdaebd1657.jpg
This commit is contained in:
+4
-2
@@ -982,7 +982,7 @@ export class DatabaseStorage implements IStorage {
|
||||
debug(`Getting audit logs: connectionId=${connectionId}, userId=${userId}, page=${page}, pageSize=${pageSize}`);
|
||||
|
||||
// Define the base query for counting total records
|
||||
let countQuery = db.select({ count: sql`count(*)` }).from(auditLogs);
|
||||
let countQuery = db.select({ count: sql`count(*)::int` }).from(auditLogs);
|
||||
let dataQuery = db.select().from(auditLogs);
|
||||
|
||||
// Apply filters if provided
|
||||
@@ -1005,7 +1005,9 @@ export class DatabaseStorage implements IStorage {
|
||||
|
||||
// Get total count of records
|
||||
const countResult = await countQuery;
|
||||
const totalRecords = parseInt(countResult[0].count.toString());
|
||||
const totalRecords = typeof countResult[0].count === 'number'
|
||||
? countResult[0].count
|
||||
: parseInt(String(countResult[0].count), 10);
|
||||
|
||||
// Calculate pagination values
|
||||
const totalPages = Math.ceil(totalRecords / pageSize);
|
||||
|
||||
Reference in New Issue
Block a user