Skip to content

Commit

Permalink
fix groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémai Gábor committed Nov 7, 2023
1 parent 1200756 commit c697ffa
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/services/groups/groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { GroupService, getOptions } from './groups.class';
import { groupPath, groupMethods } from './groups.shared';
import { iff } from 'feathers-hooks-common';
import { notSuperAdmin } from '../../hooks/notSuperAdmin';
import { notInSameTenant } from '../../hooks/notSameTenant';

export * from './groups.class';
export * from './groups.schema';
Expand All @@ -45,8 +46,14 @@ export const group = (app: Application) => {
all: [ schemaHooks.validateQuery(groupQueryValidator), iff(notSuperAdmin(), schemaHooks.resolveQuery(groupQueryResolver)) ],
find: [],
get: [],
create: [ schemaHooks.validateData(groupDataValidator), schemaHooks.resolveData(groupDataResolver) ],
patch: [ schemaHooks.validateData(groupPatchValidator), schemaHooks.resolveData(groupPatchResolver) ],
create: [
iff(notSuperAdmin(), notInSameTenant),
schemaHooks.validateData(groupDataValidator),
schemaHooks.resolveData(groupDataResolver) ],
patch: [
iff(notSuperAdmin(), notInSameTenant),
schemaHooks.validateData(groupPatchValidator),
schemaHooks.resolveData(groupPatchResolver) ],
remove: []
},
after: {
Expand Down

0 comments on commit c697ffa

Please sign in to comment.