Skip to content

Commit

Permalink
fingerprint 관련 동작 비활성화
Browse files Browse the repository at this point in the history
  • Loading branch information
JeongHunHui committed Dec 2, 2024
1 parent 4f30169 commit 0258f8d
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 189 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-actuator")

// fingerprint
implementation("com.github.fingerprintjs:fingerprint-pro-server-api-java-sdk:v6.0.0")
// implementation("com.github.fingerprintjs:fingerprint-pro-server-api-java-sdk:v6.0.0")

// security
implementation("org.springframework.boot:spring-boot-starter-security")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import com.sbl.sulmun2yong.ai.domain.AIGenerateLog
import com.sbl.sulmun2yong.ai.dto.request.DemoSurveyGenerationWithFileUrlRequest
import com.sbl.sulmun2yong.ai.dto.request.SurveyGenerationWithFileUrlRequest
import com.sbl.sulmun2yong.ai.dto.response.AISurveyGenerationResponse
import com.sbl.sulmun2yong.global.fingerprint.FingerprintApi
import com.sbl.sulmun2yong.global.util.validator.FileUrlValidator
import com.sbl.sulmun2yong.survey.adapter.SurveyAdapter
import com.sbl.sulmun2yong.survey.domain.Survey
Expand All @@ -21,7 +20,7 @@ class GenerateService(
private val surveyAdapter: SurveyAdapter,
private val aiDemoCountRedisAdapter: AIDemoCountRedisAdapter,
private val aiGenerateLogAdapter: AIGenerateLogAdapter,
val fingerprintApi: FingerprintApi,
// val fingerprintApi: FingerprintApi,
) {
fun generateSurveyWithFileUrl(
surveyGenerationWithFileUrlRequest: SurveyGenerationWithFileUrlRequest,
Expand Down Expand Up @@ -74,7 +73,7 @@ class GenerateService(
val userPrompt = demoSurveyGenerationWithFileUrlRequest.userPrompt

validateFileUrl(fileUrl)
fingerprintApi.validateVisitorId(visitorId)
// fingerprintApi.validateVisitorId(visitorId)
aiDemoCountRedisAdapter.incrementOrCreate(visitorId)

val surveyId = UUID.randomUUID()
Expand Down

This file was deleted.

54 changes: 0 additions & 54 deletions src/main/kotlin/com/sbl/sulmun2yong/global/util/FingerprintApi.kt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.sbl.sulmun2yong.survey.service

import com.sbl.sulmun2yong.global.fingerprint.FingerprintApi
import com.sbl.sulmun2yong.survey.adapter.ParticipantAdapter
import com.sbl.sulmun2yong.survey.adapter.ResponseAdapter
import com.sbl.sulmun2yong.survey.adapter.SurveyAdapter
Expand All @@ -16,15 +15,15 @@ class SurveyResponseService(
val surveyAdapter: SurveyAdapter,
val participantAdapter: ParticipantAdapter,
val responseAdapter: ResponseAdapter,
val fingerprintApi: FingerprintApi,
// val fingerprintApi: FingerprintApi,
) {
// TODO: 트랜잭션 처리 추가하기
fun responseToSurvey(
surveyId: UUID,
surveyResponseRequest: SurveyResponseRequest,
): SurveyParticipantResponse {
validateIsAlreadyParticipated(surveyId, surveyResponseRequest.visitorId)
fingerprintApi.validateVisitorId(surveyResponseRequest.visitorId)
// fingerprintApi.validateVisitorId(surveyResponseRequest.visitorId)
val visitorId = surveyResponseRequest.visitorId
val survey = surveyAdapter.getSurvey(surveyId)
val surveyResponse = surveyResponseRequest.toDomain(surveyId)
Expand Down

0 comments on commit 0258f8d

Please sign in to comment.