implemented account list

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-04-02 13:57:08 +02:00
parent 44fb120891
commit a5d5d5872d
5 changed files with 29 additions and 4 deletions

View File

@@ -26,6 +26,7 @@ import static de.srsoftware.tools.Optionals.nullIfEmpty;
import static de.srsoftware.umbrella.accounting.Constants.CONFIG_DATABASE;
import static de.srsoftware.umbrella.core.ConnectionProvider.connect;
import static de.srsoftware.umbrella.core.ModuleRegistry.userService;
import static de.srsoftware.umbrella.core.Util.mapValues;
import static de.srsoftware.umbrella.core.constants.Path.JSON;
import static de.srsoftware.umbrella.core.constants.Path.SEARCH;
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.invalidField;
@@ -81,7 +82,7 @@ public class AccountingModule extends BaseHandler implements AccountingService {
}
private boolean getAccounts(UmbrellaUser user, HttpExchange ex) throws IOException {
return sendContent(ex,accountDb.listAccounts(user.id()));
return sendContent(ex,accountDb.listAccounts(user.id()).stream().map(Account::toMap));
}