Skip to content

Commit

Permalink
Fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Ortovoxx committed Mar 8, 2024
1 parent 4acdbf4 commit 4bb1b55
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/payload/collections/Nominations/access/nominees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { FieldAccess, Access } from 'payload/types'

import { checkRole } from '../../Users/checkRole'


export const nominee: FieldAccess = ({ req: { user }, data }) => {
if (user && checkRole(['admin'], user)) {
return true
Expand All @@ -15,14 +14,14 @@ export const nominee: FieldAccess = ({ req: { user }, data }) => {
return false
}

export const adminOrNominee: Access = async ({ req: { user }}) => {
export const adminOrNominee: Access = async ({ req: { user } }) => {
if (user && checkRole(['admin'], user)) {
return true
}

return {
nominees: {
contains: user.id
}
contains: user.id,
},
}
}

0 comments on commit 4bb1b55

Please sign in to comment.