member pagination search
This commit is contained in:
parent
0d2c7dd7f1
commit
b68e546788
3 changed files with 27 additions and 5 deletions
|
@ -58,7 +58,9 @@ import CommunicationCommandHandler from "../../command/communicationCommandHandl
|
|||
export async function getAllMembers(req: Request, res: Response): Promise<any> {
|
||||
let offset = parseInt((req.query.offset as string) ?? "0");
|
||||
let count = parseInt((req.query.count as string) ?? "25");
|
||||
let [members, total] = await MemberService.getAll(offset, count);
|
||||
let search = (req.query.search as string) ?? "";
|
||||
|
||||
let [members, total] = await MemberService.getAll(offset, count, search);
|
||||
|
||||
res.json({
|
||||
members: MemberFactory.mapToBase(members),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue