File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
core/ocr/src/main/kotlin/com/ninecraft/booket/core/ocr Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class CloudOcrRecognizer @Inject constructor(
2626 )
2727
2828 service.batchAnnotateImage(
29- key = BuildConfig .CLOUD_VISION_API_KEY ,
29+ apiKey = BuildConfig .CLOUD_VISION_API_KEY ,
3030 body = request,
3131 )
3232 }
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ object CloudVisionNetworkModule {
4040 @CloudVisionOkHttp
4141 fun provideOkHttp (): OkHttpClient {
4242 val log = HttpLoggingInterceptor ().apply {
43+ redactHeader(" X-Goog-Api-Key" )
4344 level = if (BuildConfig .DEBUG ) {
4445 HttpLoggingInterceptor .Level .BASIC
4546 } else {
Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ package com.ninecraft.booket.core.ocr.service
33import com.ninecraft.booket.core.ocr.model.CloudVisionRequest
44import com.ninecraft.booket.core.ocr.model.CloudVisionResponse
55import retrofit2.http.Body
6+ import retrofit2.http.Header
67import retrofit2.http.POST
7- import retrofit2.http.Query
88
99interface CloudVisionService {
1010 @POST(" v1/images:annotate" )
1111 suspend fun batchAnnotateImage (
12- @Query( " key " ) key : String ,
12+ @Header( " X-Goog-Api-Key " ) apiKey : String ,
1313 @Body body : CloudVisionRequest ,
1414 ): CloudVisionResponse
1515}
You can’t perform that action at this time.
0 commit comments