From c6d809b7ed1f5eae3965c794aae55397a6f6f8b1 Mon Sep 17 00:00:00 2001 From: NLOG Date: Sun, 25 Oct 2020 02:11:57 +0900 Subject: [PATCH] =?UTF-8?q?Release=20v0.2.8,=20=EB=8B=B9=EC=9D=BC=20?= =?UTF-8?q?=EC=9E=90=EA=B0=80=EC=A7=84=EB=8B=A8=20=EA=B8=B0=EB=A1=9D?= =?UTF-8?q?=EC=9D=B4=20=EC=97=86=EB=8A=94=20=EA=B2=BD=EC=9A=B0=20=EB=B0=9C?= =?UTF-8?q?=EC=83=9D=ED=95=98=EB=8A=94=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/util/sendSurvey.dart | 16 +++++++++------- pubspec.yaml | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/util/sendSurvey.dart b/lib/util/sendSurvey.dart index d097e99..c3aa938 100644 --- a/lib/util/sendSurvey.dart +++ b/lib/util/sendSurvey.dart @@ -1,6 +1,5 @@ import 'dart:convert'; -import 'package:flutter/widgets.dart'; import 'package:http/http.dart' as http; import 'package:jaga_jindan/type/JagaJindanData.dart'; import 'package:jaga_jindan/util/RSAEncrypt.dart'; @@ -81,11 +80,15 @@ void sendSurvey(JagaJindanData credentials, [bool byAutomatic = false]) async { })) .body); - var submittedDate = DateTime.parse(userInfo["registerDtm"]); + if (userInfo["registerDtm"] != null) { + var submittedDate = DateTime.parse(userInfo["registerDtm"]); - if (submittedDate.day == DateTime.now().day && byAutomatic && credentials.submitLimitation) { - showSurveyResult(false, "이미 제출한 기록이 있어 자동 제출을 취소했습니다.", credentials); - return; + if (submittedDate.day == DateTime.now().day && + byAutomatic && + credentials.submitLimitation) { + showSurveyResult(false, "이미 제출한 기록이 있어 자동 제출을 취소했습니다.", credentials); + return; + } } jwt = userInfo['token']; @@ -111,7 +114,7 @@ void sendSurvey(JagaJindanData credentials, [bool byAutomatic = false]) async { 'rspns14': null, 'rspns15': null, 'upperToken': jwt, - 'upperUserNameEncpt': credentials.name + 'upperUserNameEncpt': userInfo['userNameEncpt'] }), headers: {'Authorization': jwt, 'Content-Type': 'application/json'}); @@ -122,6 +125,5 @@ void sendSurvey(JagaJindanData credentials, [bool byAutomatic = false]) async { } catch (e, s) { showSurveyResult( false, "인증 정보를 한번 더 확인해주세요.\n오류가 계속 발생하는 경우 개발자에게 알려주세요.", credentials); - //toast(e.toString()); } } diff --git a/pubspec.yaml b/pubspec.yaml index 671840f..11d4699 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: 자가진단 자동화 앱 publish_to: 'none' -version: 0.2.7 +version: 0.2.8 environment: sdk: ">=2.7.0 <3.0.0"