Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

Commit

Permalink
Release v0.2.8, 당일 자가진단 기록이 없는 경우 발생하는 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
nnnlog committed Oct 24, 2020
1 parent 746df14 commit c6d809b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions lib/util/sendSurvey.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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'];
Expand All @@ -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'});

Expand All @@ -122,6 +125,5 @@ void sendSurvey(JagaJindanData credentials, [bool byAutomatic = false]) async {
} catch (e, s) {
showSurveyResult(
false, "인증 정보를 한번 더 확인해주세요.\n오류가 계속 발생하는 경우 개발자에게 알려주세요.", credentials);
//toast(e.toString());
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: 자가진단 자동화 앱

publish_to: 'none'

version: 0.2.7
version: 0.2.8

environment:
sdk: ">=2.7.0 <3.0.0"
Expand Down

0 comments on commit c6d809b

Please sign in to comment.