addLog method

Future<int> addLog(
  1. int resultsID,
  2. String logs
)

Implementation

Future<int> addLog(int resultsID, String logs) async {
  if (resultsID == -1) {
    return -1;
  }
  final Either<String, Map<String, dynamic>> res = await mappingPostRequest(
    "/logs",
    <String, dynamic>{
      "resultID": resultsID,
      "log": logs,
    },
  ).run();

  return res.getOrElse((String l) => <String, dynamic>{})["id"];
}