Убрано лишнее

This commit is contained in:
Olga Nemt 2023-10-13 10:12:15 +05:00
parent 4a67c5f629
commit 8bc215ad85
3 changed files with 10 additions and 15 deletions

View File

@ -32,15 +32,4 @@ namespace AsbCloudApp.Data
public string? CompanyTypeCaption { get; set; } = null!; public string? CompanyTypeCaption { get; set; } = null!;
} }
/// <summary>
/// DTO компании с пользователями
/// </summary>
public class CompanyWithContactsDto: CompanyDto
{
/// <summary>
/// Пользователи компании
/// </summary>
public IEnumerable<ContactDto> Contacts { get; set; } = Enumerable.Empty<ContactDto>();
}
} }

View File

@ -39,6 +39,8 @@ namespace AsbCloudWebApi.Controllers
/// <param name="token"></param> /// <param name="token"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("api/well/{idWell}/contacts/types")] [HttpGet("api/well/{idWell}/contacts/types")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(typeof(IEnumerable<CompanyTypeDto>), (int)System.Net.HttpStatusCode.OK)] [ProducesResponseType(typeof(IEnumerable<CompanyTypeDto>), (int)System.Net.HttpStatusCode.OK)]
public async Task<IActionResult> GetTypesAsync(int idWell, CancellationToken token) public async Task<IActionResult> GetTypesAsync(int idWell, CancellationToken token)
{ {
@ -54,6 +56,8 @@ namespace AsbCloudWebApi.Controllers
/// <param name="token"></param> /// <param name="token"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("api/well/{idWell}/contactType/{contactTypeId}")] [HttpGet("api/well/{idWell}/contactType/{contactTypeId}")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(typeof(IEnumerable<ContactDto>), (int)System.Net.HttpStatusCode.OK)] [ProducesResponseType(typeof(IEnumerable<ContactDto>), (int)System.Net.HttpStatusCode.OK)]
public async Task<IActionResult> GetAllAsync(int idWell, int contactTypeId, CancellationToken token) public async Task<IActionResult> GetAllAsync(int idWell, int contactTypeId, CancellationToken token)
{ {
@ -72,6 +76,8 @@ namespace AsbCloudWebApi.Controllers
/// <param name="token"></param> /// <param name="token"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("api/well/{idWell}/contact/{id}")] [HttpGet("api/well/{idWell}/contact/{id}")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(typeof(IEnumerable<ContactDto>), (int)System.Net.HttpStatusCode.OK)] [ProducesResponseType(typeof(IEnumerable<ContactDto>), (int)System.Net.HttpStatusCode.OK)]
public async Task<IActionResult> GetAsync(int idWell, int id, CancellationToken token) public async Task<IActionResult> GetAsync(int idWell, int id, CancellationToken token)
{ {

View File

@ -7,10 +7,10 @@
} }
}, },
"ConnectionStrings": { "ConnectionStrings": {
"DefaultConnection": "Host=localhost;Database=postgres2;Username=postgres;Password=q;Persist Security Info=True", "DefaultConnection": "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True",
"DebugConnection": "Host=localhost;Database=postgres2;Username=postgres;Password=q;Persist Security Info=True;Include Error Detail=True", "DebugConnection": "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True;Include Error Detail=True",
"ServerConnection": "Host=192.168.1.70;Database=postgres2;Username=postgres;Password=q;Persist Security Info=True", "ServerConnection": "Host=192.168.1.70;Database=postgres;Username=postgres;Password=q;Persist Security Info=True",
"LocalConnection": "Host=localhost;Database=postgres2;Username=postgres;Password=q;Persist Security Info=True" "LocalConnection": "Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True"
}, },
"AllowedHosts": "*", "AllowedHosts": "*",
//"userLimits": { //"userLimits": {