changed return type of getGroupById and getUserById to match expected result

This commit is contained in:
2025-06-24 20:35:30 +02:00
parent d771f78810
commit b4e91b1211
2 changed files with 4 additions and 4 deletions

View File

@@ -6,8 +6,8 @@ extension GroupMethods on AppDatabase {
return await select(group).get();
}
Future<List<GroupData>> getGroupById(String id) async {
return await (select(group)..where((g) => g.id.equals(id))).get();
Future<GroupData> getGroupById(String id) async {
return await (select(group)..where((g) => g.id.equals(id))).getSingle();
}
Future<void> addGroup(String id, String name) async {

View File

@@ -6,8 +6,8 @@ extension UserMethods on AppDatabase {
return await select(user).get();
}
Future<List<UserData>> getUserById(String id) async {
return await (select(user)..where((u) => u.id.equals(id))).get();
Future<UserData> getUserById(String id) async {
return await (select(user)..where((u) => u.id.equals(id))).getSingle();
}
Future<void> addUser(String id, String name) async {