Ensure default sorting

This commit is contained in:
Matthias 2023-04-19 06:25:24 +02:00
parent 2edfb5a20c
commit 6c6d3e587b

View File

@ -99,12 +99,12 @@ export class UserService {
public static getAvailableBots(): BotDescriptors {
const allInfo = UserService.getAllLoginInfos();
const response: BotDescriptors = {};
Object.entries(allInfo).forEach(([k, v]) => {
Object.entries(allInfo).forEach(([k, v], idx) => {
response[k] = {
botId: k,
botName: v.botName,
botUrl: v.apiUrl,
sortId: v.sortId ?? 0,
sortId: v.sortId ?? idx,
};
});
return response;