From 4bb2e3b253af27eab97dbe59cb8a25ddca7e76b1 Mon Sep 17 00:00:00 2001 From: jakehsj Date: Sun, 10 Dec 2023 21:40:02 +0900 Subject: [PATCH] fix: server connection --- .../main/java/com/team13/fooriend/ui/screen/home/HomeScreen.kt | 2 +- .../java/com/team13/fooriend/ui/screen/login/LogInScreen.kt | 3 ++- .../java/com/team13/fooriend/ui/screen/signup/SignUpScreen.kt | 2 +- .../src/main/java/com/team13/fooriend/ui/util/AccessToken.kt | 2 +- .../src/main/java/com/team13/fooriend/ui/util/LoginSuccess.kt | 2 +- frontend/app/src/main/res/xml/network_security_config.xml | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/app/src/main/java/com/team13/fooriend/ui/screen/home/HomeScreen.kt b/frontend/app/src/main/java/com/team13/fooriend/ui/screen/home/HomeScreen.kt index 465e75c..f2277fc 100644 --- a/frontend/app/src/main/java/com/team13/fooriend/ui/screen/home/HomeScreen.kt +++ b/frontend/app/src/main/java/com/team13/fooriend/ui/screen/home/HomeScreen.kt @@ -271,7 +271,7 @@ fun HomeScreen( CustomMarkerRenderer(context, map, clusterManager) val defaultClusterRenderer = clusterManager.renderer as DefaultClusterRenderer - defaultClusterRenderer.minClusterSize = 3 + defaultClusterRenderer.minClusterSize = 10 clusterManager.cluster() defaultClusterRenderer.setOnClusterItemClickListener { diff --git a/frontend/app/src/main/java/com/team13/fooriend/ui/screen/login/LogInScreen.kt b/frontend/app/src/main/java/com/team13/fooriend/ui/screen/login/LogInScreen.kt index 4d38cc8..23cd24d 100644 --- a/frontend/app/src/main/java/com/team13/fooriend/ui/screen/login/LogInScreen.kt +++ b/frontend/app/src/main/java/com/team13/fooriend/ui/screen/login/LogInScreen.kt @@ -75,7 +75,7 @@ fun LogInScreen( val color = if (isPressed) CRed else Color.DarkGray//CDarkGreen val coroutineScope = rememberCoroutineScope() val retrofit = Retrofit.Builder() - .baseUrl("http://ec2-54-180-101-207.ap-northeast-2.compute.amazonaws.com") + .baseUrl("http://ec2-13-125-245-104.ap-northeast-2.compute.amazonaws.com") .addConverterFactory(GsonConverterFactory.create()) .build() @@ -162,6 +162,7 @@ fun LogInScreen( try{ response = apiService.login(LoginBody(id, password)) } catch(e: Exception){ + Log.d("LogInScreen", "error: $e") Toast.makeText(context, "아이디 또는 비밀번호가 일치하지 않습니다.", Toast.LENGTH_SHORT).show() return@launch } diff --git a/frontend/app/src/main/java/com/team13/fooriend/ui/screen/signup/SignUpScreen.kt b/frontend/app/src/main/java/com/team13/fooriend/ui/screen/signup/SignUpScreen.kt index 059b860..22e0b98 100644 --- a/frontend/app/src/main/java/com/team13/fooriend/ui/screen/signup/SignUpScreen.kt +++ b/frontend/app/src/main/java/com/team13/fooriend/ui/screen/signup/SignUpScreen.kt @@ -81,7 +81,7 @@ fun SignUpScreen( // val (phoneNumber, phoneNumberValue) = remember { mutableStateOf("") } val retrofit = Retrofit.Builder() - .baseUrl("http://ec2-54-180-101-207.ap-northeast-2.compute.amazonaws.com") + .baseUrl("http://ec2-13-125-245-104.ap-northeast-2.compute.amazonaws.com") .addConverterFactory(GsonConverterFactory.create()) .build() diff --git a/frontend/app/src/main/java/com/team13/fooriend/ui/util/AccessToken.kt b/frontend/app/src/main/java/com/team13/fooriend/ui/util/AccessToken.kt index e0a5aa1..1d75e2f 100644 --- a/frontend/app/src/main/java/com/team13/fooriend/ui/util/AccessToken.kt +++ b/frontend/app/src/main/java/com/team13/fooriend/ui/util/AccessToken.kt @@ -31,7 +31,7 @@ fun createRetrofit(context: Context): Retrofit { .build() return Retrofit.Builder() - .baseUrl("http://ec2-54-180-101-207.ap-northeast-2.compute.amazonaws.com") + .baseUrl("http://ec2-13-125-245-104.ap-northeast-2.compute.amazonaws.com") .addConverterFactory(GsonConverterFactory.create()) .client(okHttpClient) .build() diff --git a/frontend/app/src/main/java/com/team13/fooriend/ui/util/LoginSuccess.kt b/frontend/app/src/main/java/com/team13/fooriend/ui/util/LoginSuccess.kt index 11a46b4..dde881a 100644 --- a/frontend/app/src/main/java/com/team13/fooriend/ui/util/LoginSuccess.kt +++ b/frontend/app/src/main/java/com/team13/fooriend/ui/util/LoginSuccess.kt @@ -21,7 +21,7 @@ fun LoginSuccess(context: Context, navController: NavHostController = rememberNa "restaurant/{restaurantId}" -> false "reviewDetail/{reviewId}" -> false "fooriend/{userId}" -> false - "writeReview/{restaurantPlaceId}" -> false + "writeReview/{restaurantPlaceId}/{restaurantName}" -> false "logout" -> false "myInfo" -> false else -> true // in all other cases show the bottom bar diff --git a/frontend/app/src/main/res/xml/network_security_config.xml b/frontend/app/src/main/res/xml/network_security_config.xml index 98f753c..82ecb23 100644 --- a/frontend/app/src/main/res/xml/network_security_config.xml +++ b/frontend/app/src/main/res/xml/network_security_config.xml @@ -1,6 +1,6 @@ - ec2-54-180-101-207.ap-northeast-2.compute.amazonaws.com + ec2-13-125-245-104.ap-northeast-2.compute.amazonaws.com