Skip to content

Commit

Permalink
Return type error when student list fetch exception happened (#228)
Browse files Browse the repository at this point in the history
Chore: Return type error when exception happened
  • Loading branch information
ntut-xuan authored Feb 28, 2024
1 parent 8e4c07a commit 97a78a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/connector/ischool_plus_connector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class ISchoolPlusConnector {
static Future<ReturnWithStatus<List<CourseStudent>>> getCourseStudent(String courseId) async {
try {
if (!await _selectCourse(courseId)) {
final returnResult = ReturnWithStatus();
final returnResult = ReturnWithStatus<List<CourseStudent>>();
returnResult.status = IPlusReturnStatus.noPermission;
return returnResult;
}
Expand Down Expand Up @@ -155,7 +155,7 @@ class ISchoolPlusConnector {
return returnResult;
} catch (e, stack) {
Log.eWithStack(e, stack);
final returnResult = ReturnWithStatus();
final returnResult = ReturnWithStatus<List<CourseStudent>>();
returnResult.status = IPlusReturnStatus.fail;
return returnResult;
}
Expand Down

0 comments on commit 97a78a3

Please sign in to comment.