getUserMealInfo method

dynamic getUserMealInfo()

학생의 현재 입장 여부, 선/후밥 여부를 확인하는 함수입니다.

Implementation

getUserMealInfo() async {
  try {
    Response response = await _dio.get(
      "$apiUrl/dalgeurak/me",
      options: Options(contentType: "application/json"),
    );

    Map result = response.data;
    result['mealStatus'] = result['mealStatus'].toString().convertMealStatusType;
    result['exception'] = result['exception'].toString().convertMealExceptionType;

    return {
      "success": true,
      "content": result
    };
  } on DioError catch (e) {
    return {
      "success": false
    };
  }
}