Employee uri to employee
This commit is contained in:
parent
8e31691044
commit
fa0ec795c1
@ -19,7 +19,7 @@ namespace DamageAssesment.Api.Employees.Controllers
|
|||||||
/// GET request for retrieving employees.
|
/// GET request for retrieving employees.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
[HttpGet("Employees")]
|
[HttpGet("employees")]
|
||||||
public async Task<ActionResult> GetEmployeesAsync()
|
public async Task<ActionResult> GetEmployeesAsync()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ namespace DamageAssesment.Api.Employees.Controllers
|
|||||||
/// GET request for retrieving an employee by ID.
|
/// GET request for retrieving an employee by ID.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
[HttpGet("Employees/{id}")]
|
[HttpGet("employees/{id}")]
|
||||||
public async Task<ActionResult> GetEmployeeByIdAsync(int id)
|
public async Task<ActionResult> GetEmployeeByIdAsync(int id)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ namespace DamageAssesment.Api.Employees.Controllers
|
|||||||
/// PUT request for updating an existing employee.
|
/// PUT request for updating an existing employee.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Employee">The updated employee object.</param>
|
/// <param name="Employee">The updated employee object.</param>
|
||||||
[HttpPut("Employees/{id}")]
|
[HttpPut("employees/{id}")]
|
||||||
public async Task<IActionResult> UpdateEmployee(int id, Models.Employee Employee)
|
public async Task<IActionResult> UpdateEmployee(int id, Models.Employee Employee)
|
||||||
{
|
{
|
||||||
if (Employee != null)
|
if (Employee != null)
|
||||||
@ -75,7 +75,7 @@ namespace DamageAssesment.Api.Employees.Controllers
|
|||||||
/// POST request for creating a new employee.
|
/// POST request for creating a new employee.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Employee">The employee information for creating a new employee.</param>
|
/// <param name="Employee">The employee information for creating a new employee.</param>
|
||||||
[HttpPost("Employees")]
|
[HttpPost("employees")]
|
||||||
public async Task<IActionResult> CreateEmployee(Models.Employee Employee)
|
public async Task<IActionResult> CreateEmployee(Models.Employee Employee)
|
||||||
{
|
{
|
||||||
if (Employee != null)
|
if (Employee != null)
|
||||||
@ -93,7 +93,7 @@ namespace DamageAssesment.Api.Employees.Controllers
|
|||||||
/// DELETE request for deleting an existing employee.
|
/// DELETE request for deleting an existing employee.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">The ID of the employee to be deleted.</param>
|
/// <param name="id">The ID of the employee to be deleted.</param>
|
||||||
[HttpDelete("Employees/{id}")]
|
[HttpDelete("employees/{id}")]
|
||||||
public async Task<IActionResult> DeleteEmployee(int id)
|
public async Task<IActionResult> DeleteEmployee(int id)
|
||||||
{
|
{
|
||||||
var result = await this.EmployeeProvider.DeleteEmployeeAsync(id);
|
var result = await this.EmployeeProvider.DeleteEmployeeAsync(id);
|
||||||
|
@ -31,7 +31,7 @@ namespace DamageAssesment.Api.SurveyResponses.Providers
|
|||||||
this.questionServiceProvider = questionServiceProvider;
|
this.questionServiceProvider = questionServiceProvider;
|
||||||
this.surveyServiceProvider = surveyServiceProvider;
|
this.surveyServiceProvider = surveyServiceProvider;
|
||||||
this.mapper = mapper;
|
this.mapper = mapper;
|
||||||
// seedData();
|
seedData();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void seedData()
|
private void seedData()
|
||||||
|
@ -6,14 +6,14 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
ports:
|
ports:
|
||||||
- "80/http"
|
- "6001:80"
|
||||||
|
|
||||||
attachments:
|
attachments:
|
||||||
image: santhoshsnair/damageassesmentapiattachments:latest
|
image: santhoshsnair/damageassesmentapiattachments:latest
|
||||||
environment:
|
environment:
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
ports:
|
ports:
|
||||||
- "80/http"
|
- "6002:80"
|
||||||
|
|
||||||
|
|
||||||
employees:
|
employees:
|
||||||
@ -21,7 +21,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
ports:
|
ports:
|
||||||
- "80/http"
|
- "6003:80"
|
||||||
|
|
||||||
|
|
||||||
locations:
|
locations:
|
||||||
@ -29,7 +29,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
ports:
|
ports:
|
||||||
- "80/http"
|
- "6004:80"
|
||||||
|
|
||||||
|
|
||||||
questions:
|
questions:
|
||||||
@ -37,7 +37,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
ports:
|
ports:
|
||||||
- "80/http"
|
- "6005:80"
|
||||||
|
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
@ -60,7 +60,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
ports:
|
ports:
|
||||||
- "80/http"
|
- "6007:80"
|
||||||
|
|
||||||
|
|
||||||
doculinks:
|
doculinks:
|
||||||
@ -68,5 +68,13 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
ports:
|
ports:
|
||||||
- "80/http"
|
- "6009:80"
|
||||||
|
sqlserver:
|
||||||
|
image: mcr.microsoft.com/mssql/server:2019-latest
|
||||||
|
environment:
|
||||||
|
- SA_PASSWORD=your_password
|
||||||
|
- ACCEPT_EULA=Y
|
||||||
|
ports:
|
||||||
|
- "1433:1433"
|
||||||
|
volumes:
|
||||||
|
- ./sql_data:/var/opt/mssql/data
|
@ -9,6 +9,7 @@
|
|||||||
<DockerServiceName>damageassesment.api.answers</DockerServiceName>
|
<DockerServiceName>damageassesment.api.answers</DockerServiceName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="docker-compose.sql.yml" />
|
||||||
<None Include="docker-compose.asf.yml" />
|
<None Include="docker-compose.asf.yml" />
|
||||||
<None Include="docker-compose.override.yml">
|
<None Include="docker-compose.override.yml">
|
||||||
<DependentUpon>docker-compose.yml</DependentUpon>
|
<DependentUpon>docker-compose.yml</DependentUpon>
|
||||||
|
78
DamageAssesmentApi/docker-compose.sql.yml
Normal file
78
DamageAssesmentApi/docker-compose.sql.yml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
version: '3.4'
|
||||||
|
|
||||||
|
services:
|
||||||
|
answers:
|
||||||
|
image: santhoshsnair/damageassesmentapianswers:latest
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
ports:
|
||||||
|
- "6001:80"
|
||||||
|
|
||||||
|
attachments:
|
||||||
|
image: santhoshsnair/damageassesmentapiattachments:latest
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
ports:
|
||||||
|
- "6002:80"
|
||||||
|
|
||||||
|
|
||||||
|
employees:
|
||||||
|
image: santhoshsnair/damageassesmentapiemployees:latest
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
ports:
|
||||||
|
- "6003:80"
|
||||||
|
|
||||||
|
|
||||||
|
locations:
|
||||||
|
image: santhoshsnair/damageassesmentapilocations:latest
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
ports:
|
||||||
|
- "6004:80"
|
||||||
|
|
||||||
|
|
||||||
|
questions:
|
||||||
|
image: santhoshsnair/damageassesmentapiquestions:latest
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
ports:
|
||||||
|
- "6005:80"
|
||||||
|
|
||||||
|
|
||||||
|
responses:
|
||||||
|
image: santhoshsnair/damageassesmentapisurveyresponses:latest
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
- services__Answers=http://10.0.0.4:19081/dasapp/answers/
|
||||||
|
- services__Locations=http://10.0.0.4:19081/dasapp/locations/
|
||||||
|
- services__Questions=http://10.0.0.4:19081/dasapp/questions/
|
||||||
|
- services__Employees=http://10.0.0.4:19081/dasapp/employees/
|
||||||
|
- services__Attachments=http://10.0.0.4:19081/dasapp/attachments/
|
||||||
|
- services__Surveys=http://10.0.0.4:19081/dasapp/survey/
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- "6006:80"
|
||||||
|
|
||||||
|
|
||||||
|
surveys:
|
||||||
|
image: santhoshsnair/damageassesmentapisurveys:latest
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
ports:
|
||||||
|
- "6007:80"
|
||||||
|
|
||||||
|
|
||||||
|
doculinks:
|
||||||
|
image: santhoshsnair/damageassesmentapidoculinks:latest
|
||||||
|
environment:
|
||||||
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
ports:
|
||||||
|
- "6009:80"
|
||||||
|
sqlserver:
|
||||||
|
image: mcr.microsoft.com/mssql/server:2019-latest
|
||||||
|
environment:
|
||||||
|
- SA_PASSWORD=your_password
|
||||||
|
- ACCEPT_EULA=Y
|
||||||
|
ports:
|
||||||
|
- "1433:1433"
|
Loading…
Reference in New Issue
Block a user