Skip to content

Commit

Permalink
Docs: Prisma example return types and var names (#1747)
Browse files Browse the repository at this point in the history
  • Loading branch information
damon314159 authored Nov 23, 2024
1 parent 504adb8 commit 7e9092d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pages/sessions/basic-api/prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ import { prisma } from "./db.js";

// ...

export async function invalidateSession(sessionId: string): void {
export async function invalidateSession(sessionId: string): Promise<void> {
await prisma.session.delete({ where: { id: sessionId } });
}
```
Expand Down Expand Up @@ -231,8 +231,8 @@ export async function validateSessionToken(token: string): Promise<SessionValida
return { session, user };
}

export async function invalidateSession(sessionId: string): void {
await db.session.delete({ where: { id: sessionId } });
export async function invalidateSession(sessionId: string): Promise<void> {
await prisma.session.delete({ where: { id: sessionId } });
}

export type SessionValidationResult =
Expand Down

0 comments on commit 7e9092d

Please sign in to comment.