Skip to content

Commit

Permalink
Version docs to 7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jtoar committed Apr 10, 2024
1 parent 6bc1835 commit 8aa6abf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/versioned_docs/version-7.3/tutorial/chapter7/rbac.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ Before we do that, we'll need to make sure that the web side has access to the r
```javascript title="api/src/lib/auth.js"
export const getCurrentUser = async (session) => {
if (!session || typeof session.id !== 'number') {
throw new Error('Invalid session')
}

return await db.user.findUnique({
where: { id: session.id },
// highlight-next-line
Expand Down

0 comments on commit 8aa6abf

Please sign in to comment.