File tree 3 files changed +10
-9
lines changed
3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change
1
+ import 'package:inmat/inmat/exception/inmat_exception.dart' ;
1
2
import 'package:inmat/inmat/inmat_local_interface.dart' ;
2
3
3
4
import '../inmat.dart' ;
@@ -34,12 +35,16 @@ class InmatAuth {
34
35
}
35
36
36
37
Future <void > logout () async {
37
- local.clearToken ();
38
- data.clearProfile ();
39
- await InmatApi .auth.logout ();
38
+ clear ();
39
+ try {
40
+ await InmatApi .auth.logout ();
41
+ }on AccessDenied {
42
+ print ("로그아웃을 하는데 토큰이 만료되어서 오류가 발생했습니다." );
43
+ }
44
+
40
45
}
41
46
42
- void resignIn () {
47
+ void clear () {
43
48
local.clearToken ();
44
49
data.clearProfile ();
45
50
}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import 'toast.dart';
8
8
class OnReSignIn {
9
9
static reSignIn ([BuildContext ? cococo]) {
10
10
Message .showMessage ("다시 로그인 해주세요." );
11
- InmatAuth .instance.resignIn ();
11
+ InmatAuth .instance.clear ();
12
12
Navigator .pushAndRemoveUntil (
13
13
NavigatorContext .context,
14
14
CupertinoPageRoute (builder: (_) => const SignInMainPage ()),
Original file line number Diff line number Diff line change @@ -10,10 +10,6 @@ import 'package:inmat/src/home/model/home_model_json.dart';
10
10
import 'package:inmat/src/home/model/restaurant_model.dart' ;
11
11
import 'package:inmat/src/home/model/review_model.dart' ;
12
12
import 'package:inmat/src/home/model/today_model.dart' ;
13
- import 'package:inmat/src/profile/models/my_favorite_model.dart' ;
14
- import 'package:inmat/src/profile/models/my_review_model.dart' ;
15
- import 'package:inmat/src/profile/models/posts_model.dart' ;
16
- import 'package:inmat/src/search/domain/models/recent_model.dart' ;
17
13
18
14
void main () {
19
15
group ("restaurant api 테스트" , () {
You can’t perform that action at this time.
0 commit comments