Skip to content

Commit

Permalink
some improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Anatoliy committed Aug 18, 2023
1 parent 3330a1b commit 17ff454
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/client/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<a
href="/prices"
class="permalink text-slate-700 hover:bg-slate-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-slate-400 md:dark:hover:text-white dark:hover:bg-slate-700 dark:hover:text-white md:dark:hover:bg-transparent block py-2 pl-3 pr-4 rounded"
>Prices</a
>Pricing</a
>
</li>

Expand Down
1 change: 1 addition & 0 deletions src/routes/(app)/(pages)/faq/+page.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const csr = false;
export const prerender = true;
1 change: 1 addition & 0 deletions src/routes/(app)/(pages)/privacy-policy/+page.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const csr = false;
export const prerender = true;
1 change: 1 addition & 0 deletions src/routes/(app)/(pages)/terms-conditions/+page.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const csr = false;
export const prerender = true;
2 changes: 1 addition & 1 deletion src/routes/(app)/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
<title>{PUBLIC_APP_NAME}</title>
</svelte:head>

<main class="max-w-screen-xl px-4 mx-auto">MAIN</main>
<main class="max-w-screen-xl px-4 mx-auto">Main Page</main>
4 changes: 2 additions & 2 deletions src/routes/(auth)/login/+page.server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { auth } from '$lib/server/lucia';
import { generateRandomString, isWithinExpiration } from 'lucia/utils';
import { fail, json, redirect } from '@sveltejs/kit';
import { generateRandomString } from 'lucia/utils';
import { fail, redirect } from '@sveltejs/kit';
import type { PageServerLoad, Actions } from './$types';
import { message, setError, superValidate } from 'sveltekit-superforms/server';
import { userSchema, otpSchema } from '$lib/zod';
Expand Down
2 changes: 2 additions & 0 deletions src/routes/(auth)/login/facebook/callback/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const GET = async ({ url, cookies, locals }) => {
const storedState = cookies.get('facebook_oauth_state');
const state = url.searchParams.get('state');
const code = url.searchParams.get('code');

// validate state
if (!storedState || !state || storedState !== state || !code) {
return new Response(null, {
Expand Down Expand Up @@ -40,6 +41,7 @@ export const GET = async ({ url, cookies, locals }) => {
email_verified: true,
role: 'client',
name: facebookUser.name,
active: true,
avatar: facebookUser.picture ? facebookUser.picture.data.url : null
}
});
Expand Down
1 change: 1 addition & 0 deletions src/routes/(auth)/login/google/callback/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const GET = async ({ url, cookies, locals }) => {
const storedState = cookies.get('google_oauth_state');
const state = url.searchParams.get('state');
const code = url.searchParams.get('code');

// validate state
if (!storedState || !state || storedState !== state || !code) {
return new Response(null, {
Expand Down

0 comments on commit 17ff454

Please sign in to comment.