mirror of
https://github.com/soconnor0919/hristudio.git
synced 2026-03-23 19:27:51 -04:00
- Install better-auth and @better-auth/drizzle-adapter - Create src/lib/auth.ts with Better Auth configuration using bcrypt - Update database schema: change auth table IDs from uuid to text - Update route handler from /api/auth/[...nextauth] to /api/auth/[...all] - Update tRPC context and middleware for Better Auth session handling - Update client components to use Better Auth APIs (signIn, signOut) - Update seed script with text-based IDs and correct account schema - Fix type errors in wizard components (robotId, optional chaining) - Fix API paths: api.robots.initialize -> api.robots.plugins.initialize - Update auth router to use text IDs for Better Auth compatibility Note: Auth tables were reset - users will need to re-register.
28 lines
1.0 KiB
JavaScript
28 lines
1.0 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.createQueryClient = void 0;
|
|
var react_query_1 = require("@tanstack/react-query");
|
|
var superjson_1 = require("superjson");
|
|
var createQueryClient = function () {
|
|
return new react_query_1.QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
// With SSR, we usually want to set some default staleTime
|
|
// above 0 to avoid refetching immediately on the client
|
|
staleTime: 30 * 1000,
|
|
},
|
|
dehydrate: {
|
|
serializeData: superjson_1.default.serialize,
|
|
shouldDehydrateQuery: function (query) {
|
|
return (0, react_query_1.defaultShouldDehydrateQuery)(query) ||
|
|
query.state.status === "pending";
|
|
},
|
|
},
|
|
hydrate: {
|
|
deserializeData: superjson_1.default.deserialize,
|
|
},
|
|
},
|
|
});
|
|
};
|
|
exports.createQueryClient = createQueryClient;
|