From eee724d4f53f468a80fc82bd2318e1d0aaed3639 Mon Sep 17 00:00:00 2001 From: Alex <78383757+Lextical@users.noreply.github.com> Date: Sat, 4 Apr 2026 18:23:15 -0600 Subject: [PATCH] fixed retrofit client, but will delete this file after merges - kept class so nothing will break when merge - then delete after merge buy making other files use Hilt --- .../java/com/example/petstoremobile/api/RetrofitClient.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/java/com/example/petstoremobile/api/RetrofitClient.java b/android/app/src/main/java/com/example/petstoremobile/api/RetrofitClient.java index b08af532..971e7306 100644 --- a/android/app/src/main/java/com/example/petstoremobile/api/RetrofitClient.java +++ b/android/app/src/main/java/com/example/petstoremobile/api/RetrofitClient.java @@ -7,6 +7,7 @@ import android.util.Log; import com.example.petstoremobile.BuildConfig; import com.example.petstoremobile.api.auth.AuthApi; import com.example.petstoremobile.api.auth.AuthInterceptor; +import com.example.petstoremobile.api.auth.TokenManager; import okhttp3.OkHttpClient; import okhttp3.logging.HttpLoggingInterceptor; @@ -15,7 +16,7 @@ import retrofit2.converter.gson.GsonConverterFactory; import java.util.concurrent.TimeUnit; -//Retrofit client Used for API calls +//Retrofit client Used for API calls TODO: DELETE THIS FILE AFTER MERGE NOW THAT WE ARE USING HILT AND NETWORKMODULE public class RetrofitClient { private static final String TAG = "RetrofitClient"; public static final String BASE_URL = getBaseUrl(); @@ -50,7 +51,7 @@ public class RetrofitClient { OkHttpClient client = new OkHttpClient.Builder() .addInterceptor(interceptor) - .addInterceptor(new AuthInterceptor(context)) + .addInterceptor(new AuthInterceptor(new TokenManager(context))) .connectTimeout(30, TimeUnit.SECONDS) .readTimeout(30, TimeUnit.SECONDS) .writeTimeout(30, TimeUnit.SECONDS)