feat: add post endpoint for complex criteria
refactor: also accept boolean for queryOrNot fn
This commit is contained in:
parent
773c7f97d8
commit
00ce2abc7e
2 changed files with 92 additions and 1 deletions
|
|
@ -28,6 +28,6 @@ export function whereAddressQuery(query: string) {
|
|||
];
|
||||
}
|
||||
|
||||
export function queryOrNot<T>(query: string, where: T): T | undefined {
|
||||
export function queryOrNot<T>(query: string | boolean, where: T): T | undefined {
|
||||
return !!query ? where : undefined;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue