Попытки в мультипарсинг
This commit is contained in:
@@ -8,7 +8,8 @@ namespace CodeBase.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class CodeController(CodeService service) : ControllerBase
|
||||
public class CodeController(CodeService service,
|
||||
ScipProcessingService scipProcessingService) : ControllerBase
|
||||
{
|
||||
[HttpPost("analyze")]
|
||||
public async Task<CodeChunk> AnalyzeRepository(string path, string name)
|
||||
@@ -22,5 +23,12 @@ namespace CodeBase.Controllers
|
||||
var answer = await service.GetAnswerAsync(name, question);
|
||||
return answer;
|
||||
}
|
||||
|
||||
[HttpPost("parser")]
|
||||
public async Task<string> ParserProject(string path, string name, string lang)
|
||||
{
|
||||
await scipProcessingService.ProcessAndSaveProjectAsync(path, lang, name);
|
||||
return "Проект добавлен в базу";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user