mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-10-24 03:09:26 +00:00
🔧 fix: align revokeCapability type annotation with implementation
The rebase auto-merge of systemGrant.ts kept dev's outer type annotation
(`revokeCapability: ... => Promise<void>`) but our implementation returns
`Promise<{ deletedCount: number }>` (added during the bot-review loop to
let the audit emitter distinguish a real revoke from a no-op against a
nonexistent grant). The mismatch surfaced as TS2719 on the methods record
return at line 520. Updated the type annotation to match the impl.
The caller at packages/api/src/admin/grants.ts:444 reads
`revokeResult.deletedCount` to gate the audit emit, so the wider return
type is what the rest of the code already assumes.
This commit is contained in:
parent
26a3f0aab2
commit
cefaaf0530
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ export function createSystemGrantMethods(mongoose: typeof import('mongoose')): {
|
|||
tenantId?: string;
|
||||
},
|
||||
session?: ClientSession,
|
||||
) => Promise<void>;
|
||||
) => Promise<{ deletedCount: number }>;
|
||||
hasCapabilityForPrincipals: ({
|
||||
principals,
|
||||
capability,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue