fix: undefined value on ids search
This commit is contained in:
parent
9734149848
commit
0bbe22e9ae
1 changed files with 4 additions and 1 deletions
|
@ -62,7 +62,10 @@ export async function getAllMembers(req: Request, res: Response): Promise<any> {
|
|||
let count = parseInt((req.query.count as string) ?? "25");
|
||||
let search = (req.query.search as string) ?? "";
|
||||
let noLimit = req.query.noLimit === "true";
|
||||
let ids = (req.query.ids as string).split(",").map((i) => parseInt(i));
|
||||
let ids = ((req.query.ids ?? "") as string)
|
||||
.split(",")
|
||||
.filter((i) => i)
|
||||
.map((i) => parseInt(i));
|
||||
|
||||
let [members, total] = await MemberService.getAll({ offset, count, search, noLimit, ids });
|
||||
|
||||
|
|
Loading…
Reference in a new issue