Skip to content

Commit

Permalink
Merge pull request #81 from s1lvax/fix/spotify
Browse files Browse the repository at this point in the history
fix 1
  • Loading branch information
s1lvax authored Oct 23, 2024
2 parents ee8e8d2 + b12f9ec commit 54c6378
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/lib/components/MyProfile/UserStats.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
import GitHub from 'lucide-svelte/icons/github';
import Users from 'lucide-svelte/icons/users';
import Folder from 'lucide-svelte/icons/folder';
import * as Card from '$lib/components/ui/card';
import type { PrivateProfileData } from '$lib/types/PrivateProfileData';
import { Skeleton } from '$lib/components/ui/skeleton';
import StatsCard from '$lib/components/Shared/StatsCard.svelte';
import StatsCardSkeleton from '../Shared/StatsCardSkeleton.svelte';
Expand Down
10 changes: 10 additions & 0 deletions src/lib/utils/deleteUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ export const deleteUser = async (githubId: number, userId: number) => {
where: { userId: githubId }
});

//delete all the hobbies
await prisma.hobby.deleteMany({
where: { userId: githubId }
});

//delete all the spotify tokens
await prisma.spotifyToken.deleteMany({
where: { userId: githubId }
});

//delete the user
await prisma.user.delete({
where: { githubId, id: userId }
Expand Down

0 comments on commit 54c6378

Please sign in to comment.