mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-10-23 18:43:21 +00:00
🔧 fix: explicit factory return type on createAdminAuditLogHandlers
Same tsdown --isolatedDeclarations migration that hit packages/data-schemas also applies to packages/api; the audit-log handler factory's inferred return type tripped TS9013 against the new build pipeline. Annotated the factory with explicit handler signatures matching the sibling createAdminGrantsHandlers convention. Used Promise<Response | void> for the export handler because its final res.end() path returns undefined, unlike the other two handlers which always return a Response.
This commit is contained in:
parent
cefaaf0530
commit
1ca6877caa
1 changed files with 5 additions and 1 deletions
|
|
@ -257,7 +257,11 @@ function parseFilters(
|
|||
};
|
||||
}
|
||||
|
||||
export function createAdminAuditLogHandlers(deps: AdminAuditLogDeps) {
|
||||
export function createAdminAuditLogHandlers(deps: AdminAuditLogDeps): {
|
||||
listAuditLog: (req: ServerRequest, res: Response) => Promise<Response>;
|
||||
getAuditLogEntry: (req: ServerRequest, res: Response) => Promise<Response>;
|
||||
exportAuditLogCsv: (req: ServerRequest, res: Response) => Promise<Response | void>;
|
||||
} {
|
||||
const { listAuditLogPage, findAuditLogEntry, streamAuditLogEntries } = deps;
|
||||
|
||||
async function listAuditLogHandler(req: ServerRequest, res: Response) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue