diff options
author | Chocobozzz <me@florianbigard.com> | 2021-05-03 15:53:07 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-03 16:42:15 +0200 |
commit | 1a7d0887b6c22ca6539a15297fd4159d33d7dc48 (patch) | |
tree | a6a7c0c55ab0c8af74bb5df7baef13c10cc3ef64 /client/src/app/core/users | |
parent | 1de8740195bedd0d3d43acf69f443f27364e39ce (diff) | |
download | PeerTube-1a7d0887b6c22ca6539a15297fd4159d33d7dc48.tar.gz PeerTube-1a7d0887b6c22ca6539a15297fd4159d33d7dc48.tar.zst PeerTube-1a7d0887b6c22ca6539a15297fd4159d33d7dc48.zip |
Refactor parseQueryStringFilter boolean handler
Diffstat (limited to 'client/src/app/core/users')
-rw-r--r-- | client/src/app/core/users/user.service.ts | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/client/src/app/core/users/user.service.ts b/client/src/app/core/users/user.service.ts index 3de83152c..47db985e1 100644 --- a/client/src/app/core/users/user.service.ts +++ b/client/src/app/core/users/user.service.ts | |||
@@ -320,13 +320,7 @@ export class UserService { | |||
320 | const filters = this.restService.parseQueryStringFilter(search, { | 320 | const filters = this.restService.parseQueryStringFilter(search, { |
321 | blocked: { | 321 | blocked: { |
322 | prefix: 'banned:', | 322 | prefix: 'banned:', |
323 | isBoolean: true, | 323 | isBoolean: true |
324 | handler: v => { | ||
325 | if (v === 'true') return v | ||
326 | if (v === 'false') return v | ||
327 | |||
328 | return undefined | ||
329 | } | ||
330 | } | 324 | } |
331 | }) | 325 | }) |
332 | 326 | ||