Skip to content

Commit

Permalink
Updated validateToken queryKey
Browse files Browse the repository at this point in the history
  • Loading branch information
atrincas committed Dec 31, 2024
1 parent 4297e39 commit d195c42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/components/session-checker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { isPrivatePath } from "@/lib/utils";
*/
export default function SessionChecker() {
const { data: session } = useSession();
const queryKey = queryKeys.auth.validateToken.queryKey;
const queryKey = queryKeys.auth.validateToken(session?.accessToken).queryKey;
const { error } = client.auth.validateToken.useQuery(
queryKey,
{
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/query-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { filtersSchema } from "@/app/(overview)/url-store";
import { TABLE_VIEWS } from "@/containers/overview/table/toolbar/table-selector";

export const authKeys = createQueryKeys("auth", {
validateToken: null,
validateToken: (token?: string) => ["validate-token", token],
resetPasswordToken: (token: string) => ["reset-password-token", token],
confirmEmailToken: (token: string) => ["confirm-email-token", token],
});
Expand Down

0 comments on commit d195c42

Please sign in to comment.