added posts on feed and posts on map

This commit is contained in:
SlimusMinus
2026-09-29 01:03:54 +03:00
parent a44ca00222
commit 870739f45f
22 changed files with 639 additions and 44 deletions

View File

@@ -0,0 +1,39 @@
package com.krylov.refound.controller;
import com.krylov.refound.ai.client.TextModerationClient;
import com.krylov.refound.ai.dto.ModerationResponse;
import com.krylov.refound.service.SchedulerService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/api/v1/test")
@RequiredArgsConstructor
@Slf4j
public class TestController {
private final SchedulerService schedulerService;
private final TextModerationClient client;
@GetMapping("/test1")
public Integer tested1() {
schedulerService.deleteExpiredPosts();
return 200;
}
@PostMapping("/test-ai")
public ModerationResponse test(@RequestParam String text){
return client.moderate(text);
}
}