mirror of
https://github.com/better-auth/better-auth.git
synced 2026-07-23 03:24:51 -05:00
fix(mongodb): mongodb findOneAndUpdate should return .value (#6139)
This commit is contained in:
@@ -513,10 +513,12 @@ export const mongodbAdapter = (
|
||||
{
|
||||
session,
|
||||
returnDocument: "after",
|
||||
includeResultMetadata: true,
|
||||
},
|
||||
);
|
||||
if (!res) return null;
|
||||
return res as any;
|
||||
const doc = (res as any)?.value ?? null;
|
||||
if (!doc) return null;
|
||||
return doc as any;
|
||||
},
|
||||
async updateMany({ model, where, update: values }) {
|
||||
const clause = convertWhereClause({ where, model });
|
||||
|
||||
Reference in New Issue
Block a user