mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-22 02:26:38 +00:00
Use the log database in hybrid as well
This commit is contained in:
@@ -15,6 +15,7 @@ import { verifySessionRemoteExitNodeMiddleware } from "#private/middlewares/veri
|
|||||||
import { Router } from "express";
|
import { Router } from "express";
|
||||||
import {
|
import {
|
||||||
db,
|
db,
|
||||||
|
logsDb,
|
||||||
exitNodes,
|
exitNodes,
|
||||||
Resource,
|
Resource,
|
||||||
ResourcePassword,
|
ResourcePassword,
|
||||||
@@ -1885,7 +1886,7 @@ hybridRouter.post(
|
|||||||
const batchSize = 100;
|
const batchSize = 100;
|
||||||
for (let i = 0; i < logEntries.length; i += batchSize) {
|
for (let i = 0; i < logEntries.length; i += batchSize) {
|
||||||
const batch = logEntries.slice(i, i + batchSize);
|
const batch = logEntries.slice(i, i + batchSize);
|
||||||
await db.insert(requestAuditLog).values(batch);
|
await logsDb.insert(requestAuditLog).values(batch);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response(res, {
|
return response(res, {
|
||||||
|
|||||||
Reference in New Issue
Block a user