Skip to content

Commit bebd96e

Browse files
committed
removed console logs
1 parent 775744b commit bebd96e

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

src/lib/components/ui/editor/components/Complete.svelte

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@
7171
}
7272
} else {
7373
if (onNewline) {
74-
console.log('onnew line!');
7574
readyToLoseFocusBecauseNewLineIsCalled = true;
76-
console.log(searchValue);
7775
onNewline();
7876
}
7977
}

src/routes/(app)/app/+page.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
closeCreateSpecDialog();
9797
}
9898
} else {
99+
//TODO
99100
console.log('please login!');
100101
}
101102
}
@@ -120,6 +121,7 @@
120121
}
121122
return;
122123
} else {
124+
// TODO!
123125
console.log('please login!');
124126
}
125127
}

src/routes/(marketing)/+page.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
import demoImg from '$lib/assets/1.png';
88
import codeDemoImg from '$lib/assets/2.png';
99
import exportImg from '$lib/assets/3.png';
10+
import { onMount } from 'svelte';
11+
12+
onMount(() => {});
1013
1114
const plans = [
1215
{

src/routes/(marketing)/login/+page.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
let { data } = $props();
88
99
onMount(() => {
10-
console.log(data);
1110
if (data.authState != null) {
1211
window.location.href = '/';
1312
}

src/routes/api/auth/loginWithGoogle/+server.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { google } from "$lib/server/services/application/authService";
33
import type { RequestEvent } from "@sveltejs/kit";
44

55
export async function GET(event: RequestEvent): Promise<Response> {
6-
console.log(event.url.searchParams);
76
const postLoginPath = event.url.searchParams.get("postLoginPath") ?? "";
87

98
const state = generateState();

src/routes/api/stripe/webhook/+server.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import * as subService from "$lib/server/services/application/subscriptionServic
77
export async function POST(
88
{ request }: RequestEvent,
99
): Promise<Response> {
10-
const body = await request.json();
11-
12-
let event = body;
1310
const endpointSecret = STRIPE_WEBHOOK_SECRET;
11+
let event: Stripe.Event | null = null;
1412
const signature = request.headers.get("stripe-signature");
1513
if (!signature) {
1614
return new Response(JSON.stringify({ error: "bad request" }), {
@@ -19,10 +17,15 @@ export async function POST(
1917
}
2018
try {
2119
event = stripeClient.webhooks.constructEvent(
22-
body,
20+
await request.text(),
2321
signature,
2422
endpointSecret,
2523
);
24+
if (event === null) {
25+
return new Response(JSON.stringify({ error: "bad request" }), {
26+
status: 400,
27+
});
28+
}
2629
} catch (_err) {
2730
return new Response(JSON.stringify({ error: "bad request" }), {
2831
status: 400,
@@ -34,6 +37,7 @@ export async function POST(
3437
let customerId = "";
3538
let subscriptionId = "";
3639
let yizyUserId = "";
40+
3741
switch (event.type) {
3842
case "checkout.session.completed":
3943
checkoutSession = event.data.object;

0 commit comments

Comments
 (0)