251209_01_ENH: net ver 8로 높임, Contact 조회용 프로젝트 조회 API 추가
This commit is contained in:
@@ -37,6 +37,38 @@ namespace REPORT_API_ver6.Controllers
|
||||
return Content(null);
|
||||
}
|
||||
|
||||
[Route("list/{intranetCd}/{gkey}/{isKiwi}")]
|
||||
[HttpGet]
|
||||
public IActionResult GetProjectList
|
||||
(
|
||||
[FromHeader(Name = "token")] string? token,
|
||||
[FromHeader(Name = "X-API-Key")] string? xApiKey,
|
||||
[FromRoute] string intranetCd,
|
||||
[FromRoute] string gkey,
|
||||
[FromRoute] int isKiwi,
|
||||
[FromQuery(Name = "keyword")] string keyword = ""
|
||||
)
|
||||
{
|
||||
var configuration = Common.GetConfiguration();
|
||||
var value = configuration.GetSection("X-API-Key")[xApiKey ?? ""];
|
||||
UserInfo? userInfo = String.IsNullOrEmpty(token)? null : Security.ValidateToken(token);
|
||||
|
||||
if (userInfo != null || !String.IsNullOrEmpty(value))
|
||||
{
|
||||
intranetCd = intranetCd.Split("_")[0];
|
||||
Project project = new Project();
|
||||
DataTable resultTable = project.getProjectList(intranetCd, gkey, isKiwi, keyword);
|
||||
string returnString = Common.GetJsonFromObject(resultTable);
|
||||
|
||||
hcAccessor.HttpContext.Response.ContentType = "application/json";
|
||||
Response.StatusCode = (int)HttpStatusCode.OK;
|
||||
return Content(returnString);
|
||||
}
|
||||
|
||||
Response.StatusCode = (int)HttpStatusCode.Unauthorized;
|
||||
return Content(null);
|
||||
}
|
||||
|
||||
[Route("assign")]
|
||||
[HttpGet]
|
||||
public IActionResult GetAssignList([FromHeader] string token)
|
||||
|
||||
Reference in New Issue
Block a user