@authhero/kysely-adapter 0.6.8 → 0.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/kysely-adapter.mjs
CHANGED
|
@@ -7415,19 +7415,18 @@ function Nt(n, e = "", t = {}) {
|
|
|
7415
7415
|
}
|
|
7416
7416
|
function co(n, e) {
|
|
7417
7417
|
const t = {};
|
|
7418
|
-
Array.isArray(e) || (e = []);
|
|
7419
7418
|
for (const [r, s] of Object.entries(n)) {
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
if (
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
}
|
|
7419
|
+
const a = e.find(
|
|
7420
|
+
(o) => r.startsWith(`${o}_`)
|
|
7421
|
+
);
|
|
7422
|
+
if (!a)
|
|
7423
|
+
t[r] = s;
|
|
7424
|
+
else {
|
|
7425
|
+
const o = r.slice(a.length + 1);
|
|
7426
|
+
t[a] = {
|
|
7427
|
+
...t[a],
|
|
7428
|
+
[o]: s
|
|
7429
|
+
};
|
|
7431
7430
|
}
|
|
7432
7431
|
}
|
|
7433
7432
|
return t;
|
|
@@ -7489,7 +7488,7 @@ function _o(n) {
|
|
|
7489
7488
|
};
|
|
7490
7489
|
}
|
|
7491
7490
|
function go(n) {
|
|
7492
|
-
return async (e, t, r) => (await n.updateTable("logins").set(Nt(r)).where("
|
|
7491
|
+
return async (e, t, r) => (await n.updateTable("logins").set(Nt(r)).where("logins.login_id", "=", t).where("logins.tenant_id", "=", e).execute()).length === 1;
|
|
7493
7492
|
}
|
|
7494
7493
|
function yo(n) {
|
|
7495
7494
|
return async (e, t) => (await n.deleteFrom("logins").where("logins.tenant_id", "=", e).where("logins.id", "=", t).execute()).length > 0;
|