mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix rules permission
This commit is contained in:
parent
5f6587537e
commit
0c691257eb
1 changed files with 2 additions and 1 deletions
|
|
@ -46,10 +46,11 @@ export const rulesResolver = authorized<
|
|||
RulesSuccess,
|
||||
RulesError,
|
||||
QueryRulesArgs
|
||||
>(async (_, { enabled }, { authTrx, log }) => {
|
||||
>(async (_, { enabled }, { authTrx, log, uid }) => {
|
||||
try {
|
||||
const rules = await authTrx((t) =>
|
||||
t.getRepository(Rule).findBy({
|
||||
user: { id: uid },
|
||||
enabled: enabled === null ? undefined : enabled,
|
||||
})
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue