addSurvay method
Implementation
Future<int> addSurvay(
int sessionID,
int studentID,
Map<String, String> results,
int time,
) async {
if (sessionID == -1 || studentID == -1) {
return -1;
}
final Either<String, Map<String, dynamic>> res =
await mappingPostRequest("/surveys", <String, dynamic>{
"studentID": studentID,
"sessionID": sessionID,
"time": time,
...results,
}).run();
return res.getOrElse((String l) => <String, dynamic>{})["id"];
}