Skip to content

Commit 3c1ece7

Browse files
formatting
1 parent 0886efb commit 3c1ece7

File tree

2 files changed

+8
-8
lines changed
  • packages/start-plugin-core/tests/createMiddleware-start-compiler-plugin/snapshots

2 files changed

+8
-8
lines changed

packages/start-plugin-core/tests/createMiddleware-start-compiler-plugin/snapshots/client/factory.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { createMiddleware } from "@tanstack/react-start";
2-
import { getCookie } from "@tanstack/react-start/server";
1+
import { createMiddleware } from '@tanstack/react-start';
2+
import { getCookie } from '@tanstack/react-start/server';
33
interface AuthMiddlewareOptions {
44
allowUnauthenticated?: boolean;
55
}
@@ -11,5 +11,5 @@ interface AuthContext {
1111
export const createAuthMiddleware = (opts: AuthMiddlewareOptions = {
1212
allowUnauthenticated: false
1313
}) => createMiddleware({
14-
type: "function"
14+
type: 'function'
1515
});

packages/start-plugin-core/tests/createMiddleware-start-compiler-plugin/snapshots/server/factory.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { createMiddleware } from "@tanstack/react-start";
2-
import { getCookie } from "@tanstack/react-start/server";
1+
import { createMiddleware } from '@tanstack/react-start';
2+
import { getCookie } from '@tanstack/react-start/server';
33
interface AuthMiddlewareOptions {
44
allowUnauthenticated?: boolean;
55
}
@@ -11,14 +11,14 @@ interface AuthContext {
1111
export const createAuthMiddleware = (opts: AuthMiddlewareOptions = {
1212
allowUnauthenticated: false
1313
}) => createMiddleware({
14-
type: "function"
14+
type: 'function'
1515
}).server<AuthContext>(({
1616
next
1717
}) => {
18-
const token = getCookie("session");
18+
const token = getCookie('session');
1919
if (!token) {
2020
if (!opts.allowUnauthenticated) {
21-
throw new Error("Unauthorized");
21+
throw new Error('Unauthorized');
2222
}
2323
return next({
2424
context: {

0 commit comments

Comments
 (0)