Skip to content

Commit 1f0a6ca

Browse files
committed
fix/disable turstile
1 parent 5220e78 commit 1f0a6ca

File tree

1 file changed

+14
-4
lines changed
  • apps/server/src/services/PostApiService

1 file changed

+14
-4
lines changed

apps/server/src/services/PostApiService/index.mts

+14-4
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,20 @@ export class PostApiService implements Service {
205205
const isTusted = await this.userService.checkTrust(signedUserId)
206206
if (isPublish && !isTusted) {
207207
const isVerified = await this.verifyTurnstile(token)
208-
checks.push({
209-
type: 'turnstile',
210-
value: !isVerified,
211-
})
208+
if (!isVerified) {
209+
await this.alertIsSpam({
210+
action: type,
211+
userId: user.id,
212+
title: input.title!,
213+
country,
214+
ip,
215+
type: 'turnstile',
216+
})
217+
}
218+
// checks.push({
219+
// type: 'turnstile',
220+
// value: !isVerified,
221+
// })
212222
}
213223

214224
const isSpam = checks.map(({ value }) => value).some((check) => check)

0 commit comments

Comments
 (0)