ESLint: Auto reformat and fixing some warnings / errors.

This commit is contained in:
baldo 2022-08-23 20:08:53 +02:00
parent 5237db38e0
commit 91690509d3
50 changed files with 2141 additions and 1493 deletions
server/utils

View file

@ -1,8 +1,16 @@
import _ from "lodash";
export function inCondition<T>(field: string, list: T[]): {query: string, params: T[]} {
export function inCondition<T>(
field: string,
list: T[]
): { query: string; params: T[] } {
return {
query: '(' + field + ' IN (' + _.times(list.length, () =>'?').join(', ') + '))',
query:
"(" +
field +
" IN (" +
_.times(list.length, () => "?").join(", ") +
"))",
params: list,
}
};
}