Jelajahi Sumber

chore: format code (dev-93585fa)

github-actions[bot] 1 Minggu lalu
induk
melakukan
75cf72ab1d
2 mengubah file dengan 3 tambahan dan 5 penghapusan
  1. 2 1
      src/lib/auth-session-storage.node.ts
  2. 1 4
      src/lib/auth.ts

+ 2 - 1
src/lib/auth-session-storage.node.ts

@@ -9,5 +9,6 @@ declare global {
 }
 
 if (!globalThis.__cchAuthSessionStorage) {
-  globalThis.__cchAuthSessionStorage = new AsyncLocalStorage<ScopedAuthContext>() as unknown as AuthSessionStorage;
+  globalThis.__cchAuthSessionStorage =
+    new AsyncLocalStorage<ScopedAuthContext>() as unknown as AuthSessionStorage;
 }

+ 1 - 4
src/lib/auth.ts

@@ -41,10 +41,7 @@ export function runWithAuthSession<T>(
 ): T {
   const storage = globalThis.__cchAuthSessionStorage;
   if (!storage) return fn();
-  return storage.run(
-    { session, allowReadOnlyAccess: options?.allowReadOnlyAccess ?? false },
-    fn
-  );
+  return storage.run({ session, allowReadOnlyAccess: options?.allowReadOnlyAccess ?? false }, fn);
 }
 
 export function getScopedAuthSession(): AuthSession | null {