mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-07-17 15:18:05 +00:00
Fix issue with ComunicWeb
This commit is contained in:
src
@ -28,7 +28,23 @@ export class UserController {
|
||||
* Get information about multiple users
|
||||
*/
|
||||
public static async GetMultiple(handler : RequestHandler) {
|
||||
|
||||
let list = {};
|
||||
const IDs = handler.postNumbersList("usersID");
|
||||
|
||||
for (const id of IDs) {
|
||||
if(list.hasOwnProperty(id))
|
||||
continue;
|
||||
|
||||
const user = await UserHelper.GetUserInfo(id);
|
||||
|
||||
if(!user)
|
||||
handler.error(404, "One user was not found!");
|
||||
|
||||
list[id] = this.UserToAPI(user, handler);
|
||||
}
|
||||
|
||||
handler.send(list);
|
||||
}
|
||||
|
||||
private static UserToAPI(user : User, handler: RequestHandler) : Object {
|
||||
|
Reference in New Issue
Block a user