Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Bit-Barron committed Oct 30, 2024
1 parent 03054f8 commit 7af6e48
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/container/navbar/language-toggle.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import Button from '@/components/ui/button/button.svelte';
import { currentLang, languages, setLanguage } from '../../../store/language';
import { currentLang, setLanguage } from '@/store/language';
const localeFlags = {
en: '🇺🇸',
Expand Down
Empty file removed src/lib/server/stripe.ts
Empty file.
6 changes: 1 addition & 5 deletions src/routes/(auth)/login/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
import { Label } from '$lib/components/ui/label/index.js';
import * as Separator from '$lib/components/ui/separator/index.js';
import { _ } from 'svelte-i18n';
const googleAuth = () => {
goto('/login/google');
};
</script>

<Card.Root>
Expand Down Expand Up @@ -51,7 +47,7 @@
<Separator.Root class="shrink" />
</div>
<button
on:click={googleAuth}
on:click={() => goto('/login/google')}
class="flex h-9 w-full items-center justify-center gap-2 rounded-md border border-gray-300 bg-white px-3 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-50 focus:outline-none focus:ring-4 focus:ring-[#4285F4]/50"
>
<img
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(auth)/register/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { generateId } from 'lucia';
import { Argon2id } from 'oslo/password';
import { lucia } from '$lib/server/auth.js';
import { redirect, type Actions } from '@sveltejs/kit';
import prisma from '../../../lib/utils/prisma';
import type { PageServerLoad } from './$types';
import prisma from '@/utils/prisma';

export const load: PageServerLoad = async ({ locals }) => {
if (locals.user) {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(auth)/register/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
alt="Google logo"
class="h-5 w-5"
/>
<span>Sign up with Google</span>
<span>{$_('sign-in-with-google')}</span>
</button>
</div>
</form>
Expand Down
1 change: 0 additions & 1 deletion src/routes/(home)/+layout.svelte

This file was deleted.

2 changes: 1 addition & 1 deletion src/routes/(home)/pricing/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { Button } from '$lib/components/ui/button';
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '$lib/components/ui/card';
import { Badge } from '$lib/components/ui/badge';
import { plans } from '../../../lib/utils/constants';
import { plans } from '@/utils/constants';
</script>

<div class="min-h-screen">
Expand Down
3 changes: 1 addition & 2 deletions src/routes/api/ask/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const groqClient = new Groq({
apiKey: `${GROQ_API_KEY}`
});


export const POST: RequestHandler = async ({ request }) => {
try {
const { transcript, question } = await request.json();
Expand All @@ -21,7 +20,7 @@ export const POST: RequestHandler = async ({ request }) => {
messages: [
{
role: 'user',
content: `The following is a transcript of a YouTube video:\n\n${transcript}\n\nBased on the transcript, answer the following question:\n\n${question}\n`
content: `The following is a transcript of a YouTube video:\n\n${transcript}\n\nBased on the transcript, answer the following question:\n\n${question}\n, give a answear in the same language as the transcript.`
}
],
model: 'llama3-8b-8192'
Expand Down
2 changes: 1 addition & 1 deletion src/routes/api/auth/forgot-password/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { json } from '@sveltejs/kit';
import type { RequestHandler } from './$types';
import { transporter } from '$lib/server/mailer';
import { generateRandomString } from 'oslo/crypto';
import prisma from '../../../../lib/utils/prisma';
import prisma from '@/utils/prisma';

export const POST: RequestHandler = async ({ request }) => {
const { email } = await request.json();
Expand Down

0 comments on commit 7af6e48

Please sign in to comment.