Compare commits
2 Commits
6180e3356a
...
a8dea50c2c
Author | SHA1 | Date | |
---|---|---|---|
a8dea50c2c | |||
9ecc2c1825 |
@ -282,7 +282,7 @@ namespace BCS.BMC.Controllers
|
|||||||
var protocol = "";
|
var protocol = "";
|
||||||
if (string.IsNullOrWhiteSpace(input.CompanyUrl))
|
if (string.IsNullOrWhiteSpace(input.CompanyUrl))
|
||||||
{
|
{
|
||||||
return BadRequest("Please Enter A Valid Url");
|
return BadRequest("Please enter a valid Url");
|
||||||
}
|
}
|
||||||
using (HttpClient client = new HttpClient())
|
using (HttpClient client = new HttpClient())
|
||||||
{
|
{
|
||||||
@ -305,6 +305,11 @@ namespace BCS.BMC.Controllers
|
|||||||
{
|
{
|
||||||
return BadRequest("Invalid Company Url");
|
return BadRequest("Invalid Company Url");
|
||||||
}
|
}
|
||||||
|
var companyAccountId = await _companyMaster.FirstOrDefaultAsync(x => x.CompanyName == input.CompanyId);
|
||||||
|
if (companyAccountId == null)
|
||||||
|
{
|
||||||
|
return BadRequest("Please enter valid Company Account ID");
|
||||||
|
}
|
||||||
|
|
||||||
// var baseUrl = uri + "api/BmcLogin";
|
// var baseUrl = uri + "api/BmcLogin";
|
||||||
var baseUrl = protocol + "://" + host + "/api/BmcLogin";
|
var baseUrl = protocol + "://" + host + "/api/BmcLogin";
|
||||||
@ -347,7 +352,7 @@ namespace BCS.BMC.Controllers
|
|||||||
var contents = await response.Content.ReadAsStringAsync();
|
var contents = await response.Content.ReadAsStringAsync();
|
||||||
ResponseMessageModel result = JsonConvert.DeserializeObject<ResponseMessageModel>(contents);
|
ResponseMessageModel result = JsonConvert.DeserializeObject<ResponseMessageModel>(contents);
|
||||||
|
|
||||||
return BadRequest(result.error.message == "Login Failed" ? "Invalid Username Or Password" : result.error.message);
|
return BadRequest(result.error.message == "Login Failed" ? "Please enter valid Username or Password" : result.error.message);
|
||||||
}
|
}
|
||||||
return Ok();
|
return Ok();
|
||||||
}
|
}
|
||||||
@ -368,6 +373,11 @@ namespace BCS.BMC.Controllers
|
|||||||
{
|
{
|
||||||
return BadRequest("Url Not Found");
|
return BadRequest("Url Not Found");
|
||||||
}
|
}
|
||||||
|
var companyAccountId = await _companyMaster.FirstOrDefaultAsync(x => x.CompanyName == input.CompanyAccountId);
|
||||||
|
if (companyAccountId == null)
|
||||||
|
{
|
||||||
|
return BadRequest("Please enter valid Company Account ID");
|
||||||
|
}
|
||||||
using (HttpClient client = new HttpClient())
|
using (HttpClient client = new HttpClient())
|
||||||
{
|
{
|
||||||
var baseUrl = input.CompanyUrl + "/api/services/bwac/employeeRegister/RegisterEmployeeAsNewUser";
|
var baseUrl = input.CompanyUrl + "/api/services/bwac/employeeRegister/RegisterEmployeeAsNewUser";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user