diff --git a/src/moderation/services/autoModeration/autoModeration.service.ts b/src/moderation/services/autoModeration/autoModeration.service.ts index 3f54037..bd3cfc3 100644 --- a/src/moderation/services/autoModeration/autoModeration.service.ts +++ b/src/moderation/services/autoModeration/autoModeration.service.ts @@ -51,7 +51,7 @@ export class AutoModerationService implements IAutoModerationService { // if moderation failed, throw error if (hateSpeechResponseDto.class === "flag") { - if (hateSpeechResponseDto.confidence >= 0.92) { + if (hateSpeechResponseDto.confidence >= 0.9001) { // TODO: create a ticket for the admin to review await user.addWasOffendingRecord( diff --git a/src/posts/controllers/posts.controller.ts b/src/posts/controllers/posts.controller.ts index 8df494d..5808ad4 100644 --- a/src/posts/controllers/posts.controller.ts +++ b/src/posts/controllers/posts.controller.ts @@ -84,7 +84,7 @@ export class PostsController { @Get("/queery") @UseGuards(OptionalJwtAuthGuard) - @CacheTTL(5) + @CacheTTL(10) @UseInterceptors(CacheInterceptor) public async getAllQueeries(@AuthedUser() user: User): Promise { const queeries = await this._postsService.findAllQueeries(); @@ -96,7 +96,7 @@ export class PostsController { @Get("/story") @UseGuards(OptionalJwtAuthGuard) - @CacheTTL(5) + @CacheTTL(10) @UseInterceptors(CacheInterceptor) public async getAllStories(@AuthedUser() user: User): Promise { const stories = await this._postsService.findAllStories(); @@ -125,6 +125,7 @@ export class PostsController { } @Get("/:postId") + @CacheTTL(10) @UseGuards(OptionalJwtAuthGuard) public async getPostById( @AuthedUser() user: User, @@ -135,6 +136,7 @@ export class PostsController { } @Get("/user/:userId") + @CacheTTL(20) @UseGuards(AuthGuard("jwt")) public async getPostsByUserId( @AuthedUser() user: User,