import { RequestHandler } from "../entities/RequestHandler"; import { UserHelper } from "../helpers/UserHelper"; /** * Search controller * * @author Pierre HUBERT */ export class SearchController { /** * Search for user * * @param h Request handler */ public static async SearchUser(h : RequestHandler) { // Get request const query = h.postString("query", 1); const limit = h.postInt("searchLimit", 5); const list = await UserHelper.SearchUser(query, limit); h.send(list); } }