From cd508190a3cfcfd34dcedd3c80e4e894e282022c Mon Sep 17 00:00:00 2001 From: mathiskirchner Date: Tue, 24 Jun 2025 20:35:30 +0200 Subject: [PATCH] changed return type of getGroupById and getUserById to match expected result --- lib/data/methods/group.dart | 4 ++-- lib/data/methods/user.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/data/methods/group.dart b/lib/data/methods/group.dart index d996af6..50a1745 100644 --- a/lib/data/methods/group.dart +++ b/lib/data/methods/group.dart @@ -6,8 +6,8 @@ extension GroupMethods on AppDatabase { return await select(group).get(); } - Future> getGroupById(String id) async { - return await (select(group)..where((g) => g.id.equals(id))).get(); + Future getGroupById(String id) async { + return await (select(group)..where((g) => g.id.equals(id))).getSingle(); } Future addGroup(String id, String name) async { diff --git a/lib/data/methods/user.dart b/lib/data/methods/user.dart index ddf26b0..6f4c508 100644 --- a/lib/data/methods/user.dart +++ b/lib/data/methods/user.dart @@ -6,8 +6,8 @@ extension UserMethods on AppDatabase { return await select(user).get(); } - Future> getUserById(String id) async { - return await (select(user)..where((u) => u.id.equals(id))).get(); + Future getUserById(String id) async { + return await (select(user)..where((u) => u.id.equals(id))).getSingle(); } Future addUser(String id, String name) async {