|
@@ -12,11 +12,11 @@ namespace TEAMModelOS.API.Controllers.Core
|
|
|
{
|
|
|
[Route("api/[controller]")]
|
|
|
[ApiController]
|
|
|
- public class SchoolSystemController : Controller
|
|
|
+ public class SchoolController : Controller
|
|
|
{
|
|
|
|
|
|
public IAzureCosmosDBRepository _cosmosrepository;
|
|
|
- public SchoolSystemController(IAzureCosmosDBRepository cosmosDBRepository)
|
|
|
+ public SchoolController(IAzureCosmosDBRepository cosmosDBRepository)
|
|
|
{
|
|
|
_cosmosrepository = cosmosDBRepository;
|
|
|
}
|
|
@@ -28,7 +28,7 @@ namespace TEAMModelOS.API.Controllers.Core
|
|
|
School data = new School();
|
|
|
if (request.@params.id != null)
|
|
|
{
|
|
|
- string result = await _cosmosrepository.ReplaceObject(request.@params, request.@params.id, request.@params.code);
|
|
|
+ string result = await _cosmosrepository.ReplaceObject(request.@params, request.@params.id, request.@params.schoolCode);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -37,8 +37,8 @@ namespace TEAMModelOS.API.Controllers.Core
|
|
|
}
|
|
|
return builder.Data(data).build();
|
|
|
}
|
|
|
- [HttpPost("FindSchoolSystem")]
|
|
|
- public async Task<BaseJosnRPCResponse> GetSchoolInfo(JosnRPCRequest<Dictionary<string, object>> request)
|
|
|
+ [HttpPost("FindSchool")]
|
|
|
+ public async Task<BaseJosnRPCResponse> FindSchool(JosnRPCRequest<Dictionary<string, object>> request)
|
|
|
{
|
|
|
JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
|
|
|
List<School> sc = await _cosmosrepository.FindByParams<School>(request.@params);
|