Skip to content

Commit

Permalink
feat(envited.ascs.digital): profile relations
Browse files Browse the repository at this point in the history
Signed-off-by: Roy Scheeren <[email protected]>
  • Loading branch information
royscheeren committed Feb 29, 2024
1 parent 0d836c7 commit cccb31b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const maybeUpdatePublishedState = (db: DatabaseConnection) => async (data
}

export const getProfileBySlug = (db: DatabaseConnection) => async (slug: string) =>
db.query.profile.findFirst({
db.query.profile.findFirst({
where: eq(profile.slug, slug),
with: {
profilesToBusinessCategories: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ export const _get =
const session = await getServerSession()
const connection = await db()
const profile = await connection.getProfileBySlug(slug)
console.log('profile')
console.log(profile)

if (isNil(profile) || isEmpty(profile)) {
throw notFoundError({ resource: 'profiles', resourceId: slug, userId: session?.user.id })
}
Expand Down

0 comments on commit cccb31b

Please sign in to comment.