Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
feat: makes use of discardQuery hook
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajpiar committed Jun 5, 2020
1 parent 1642ab4 commit fece820
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/services/rns/hooks/domain-offer.hooks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HookContext } from '@feathersjs/feathers'
import { disallow } from 'feathers-hooks-common'
import { disallow, discardQuery } from 'feathers-hooks-common'

import Domain from '../models/domain.model'
import { Op } from 'sequelize'
Expand Down Expand Up @@ -57,7 +57,7 @@ export default {
}
}

delete (context.params.query as any).domain
discardQuery('domain')
}
],
get: [],
Expand Down
6 changes: 3 additions & 3 deletions src/services/rns/hooks/domain.hooks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HookContext } from '@feathersjs/feathers'
import { disallow } from 'feathers-hooks-common'
import { disallow, discardQuery } from 'feathers-hooks-common'
import { Op } from 'sequelize'
import { numberToHex, sha3 } from 'web3-utils'
import DomainOffer from '../models/domain-offer.model'
Expand Down Expand Up @@ -74,8 +74,8 @@ export default {
}
}
}
delete (context.params.query as any).status
delete (context.params.query as any).name
discardQuery('placed')
discardQuery('name')
}
}
],
Expand Down
4 changes: 2 additions & 2 deletions src/services/rns/hooks/sold-domain.hooks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HookContext } from '@feathersjs/feathers'
import { disallow } from 'feathers-hooks-common'
import { disallow, discardQuery } from 'feathers-hooks-common'

import Domain from '../models/domain.model'
import { Op } from 'sequelize'
Expand Down Expand Up @@ -54,7 +54,7 @@ export default {
}
}

delete (context.params.query as any).domain
discardQuery('domain')
}
],
get: [],
Expand Down

0 comments on commit fece820

Please sign in to comment.