Restructure progress

This commit is contained in:
Roman Krček
2025-07-08 12:07:43 +02:00
parent 635f507e23
commit ed317feae7
32 changed files with 257 additions and 594 deletions

View File

@@ -1,6 +1,6 @@
import { redirect } from '@sveltejs/kit';
import type { RequestHandler } from './$types';
import { authServer } from '$lib/google/index.js';
import { googleAuthServer } from '$lib/google/server.ts';
export const GET: RequestHandler = async ({ url }) => {
try {
@@ -17,7 +17,7 @@ export const GET: RequestHandler = async ({ url }) => {
}
// Exchange code for tokens
const oauth = authServer.getOAuthClient();
const oauth = googleAuthServer.getOAuthClient();
const { tokens } = await oauth.getToken(code);
if (!tokens.refresh_token || !tokens.access_token) {