This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ApiController] | |
[Route("api/[controller]/[action]")] | |
[Produces("application/json")] | |
public abstract class BaseController : ControllerBase | |
{ | |
[FromHeader(Name = DeviceProperties.DEVICE_TYPE_KEY)] | |
[DefaultValue(DeviceCodes.Browser)] | |
public string DeviceType { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ClientUrls": [ | |
"http://localhost:2755", | |
"https://mb.ipakyulibank.uz:2744", | |
"https://mb.ipakyulibank.uz:2755" | |
], | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GlobalMiddleware | |
{ | |
private readonly RequestDelegate _next; | |
private readonly ILogger<GlobalMiddleware> _logger; | |
public GlobalMiddleware(RequestDelegate next,ILogger<GlobalMiddleware> logger) | |
{ | |
_next = next; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ItemGroup> | |
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0" /> | |
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0" /> | |
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.7.1" /> | |
</ItemGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RecaptchaResponse | |
{ | |
[JsonProperty("success")] | |
public bool Success { get; set; } | |
[JsonProperty("error-codes")] | |
public List<string> ErrorCodes { get; set; } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GlobalMiddleware | |
{ | |
private readonly RequestDelegate _next; | |
public GlobalMiddleware(RequestDelegate next ) | |
{ | |
_next = next; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GlobalMiddleware | |
{ | |
private readonly RequestDelegate _next; | |
private string _requestBody; | |
public GlobalMiddleware(RequestDelegate next) | |
{ | |
_next = next; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpGet] | |
[ProducesDefaultResponseType(typeof(ApiResponse<List<NotificationItem>>))] | |
public async Task<IActionResult> Notifications(){} | |
[HttpPost("{productId}")] | |
[ProducesDefaultResponseType(typeof(ApiResponse))] | |
public async Task<IActionResult> PostFeedback([FromRoute] long productId, [FromBody] ProductPostFeedback model){} | |
[HttpPost] | |
[ProducesDefaultResponseType(typeof(ApiResponse))] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ApiResponse<T> | |
{ | |
public ApiResponse() | |
{ | |
Success = true; | |
} | |
public ApiResponse(string error) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes auto; | |
events { | |
worker_connections 1024; | |
} | |
http { |
NewerOlder