Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion PriceNegotiationApp/Services/AuthService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.IdentityModel.Tokens.Jwt;
using PriceNegotiationApp.Extensions.Conversions;
using PriceNegotiationApp.Auth.Authentication.JWT;
using System.Text.RegularExpressions;

namespace PriceNegotiationApp.Services
{
Expand Down Expand Up @@ -50,7 +51,7 @@ public async Task<AuthResponseDTO> AuthenticateAsync(LoginModel model)

var token = new JwtSecurityTokenHandler().WriteToken(tokenOptions);

_logger.LogInformation("User {Username} authenticated successfully.", model.Username);
_logger.LogInformation("User {Username} authenticated successfully.", Regex.Replace((model.Username).ToString(), "\n|\r", "-"));

return new AuthResponseDTO { IsAuthSuccessful = true, Token = token };
}
Expand Down
3 changes: 2 additions & 1 deletion PriceNegotiationApp/Services/NegotiationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using PriceNegotiationApp.Utility.Custom_Exceptions;
using System.Runtime.CompilerServices;
using System.Security.Claims;
using System.Text.RegularExpressions;

namespace PriceNegotiationApp.Services
{
Expand Down Expand Up @@ -187,7 +188,7 @@ public async Task<Negotiation> CreateNegotiationAsync(NegotiationInputModel nego
_context.Negotiations.Add(negotiation);
await _context.SaveChangesAsync();

_logger.LogInformation("Negotiation with ID '{Id}' created successfully.", negotiation.Id);
_logger.LogInformation("Negotiation with ID '{Id}' created successfully.", Regex.Replace((negotiation.Id).ToString(), "\n|\r", "-"));

return negotiation;
}
Expand Down
3 changes: 2 additions & 1 deletion PriceNegotiationApp/Services/ProductService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using PriceNegotiationApp.Models.Input_Models;
using PriceNegotiationApp.Utility;
using PriceNegotiationApp.Utility.Custom_Exceptions;
using System.Text.RegularExpressions;

namespace PriceNegotiationApp.Services
{
Expand Down Expand Up @@ -92,7 +93,7 @@ public async Task<Product> CreateProductAsync(ProductInputModel product)
_context.Products.Add(dbProduct);
await _context.SaveChangesAsync();

_logger.LogInformation("Product with ID '{Id}' created successfully.", dbProduct.Id);
_logger.LogInformation("Product with ID '{Id}' created successfully.", Regex.Replace((dbProduct.Id).ToString(), "\n|\r", "-"));

return dbProduct;
}
Expand Down