changed return type of getGroupById and getUserById to match expected result
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user