#444 performance issues WordCounts
This commit is contained in:
parent
3f55a0a2b6
commit
ddfdacb523
@ -4246,6 +4246,11 @@ namespace RMuseum.Controllers
|
||||
|
||||
public async Task<IActionResult> GetCategoryWordCountsAsync(int catId, string term, [FromQuery] PagingParameterModel paging)
|
||||
{
|
||||
if (!bool.Parse(Configuration["WordCounts"]))
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
var pagedResult = await _ganjoorService.GetCategoryWordCountsAsync(catId, term, paging);
|
||||
if (!string.IsNullOrEmpty(pagedResult.ExceptionString))
|
||||
return BadRequest(pagedResult.ExceptionString);
|
||||
@ -4264,6 +4269,10 @@ namespace RMuseum.Controllers
|
||||
|
||||
public async Task<IActionResult> GetCategoryWordCountSummaryAsync(int catId)
|
||||
{
|
||||
if(!bool.Parse(Configuration["WordCounts"]))
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
var res = await _ganjoorService.GetCategoryWordCountSummaryAsync(catId);
|
||||
if (!string.IsNullOrEmpty(res.ExceptionString))
|
||||
return BadRequest(res.ExceptionString);
|
||||
|
||||
@ -81,6 +81,7 @@
|
||||
},
|
||||
"WebServiceUrl": "http://localhost:3439",
|
||||
"ReadOnlyMode": "False",
|
||||
"WordCounts": "True",
|
||||
"AuditNetEnabled": "False",
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user