Compare commits

...

4 Commits

Author SHA1 Message Date
khwezi 30cde40d5b Merge pull request 'Added caching to docker build stage' (#95) from cart into main
Reviewed-on: #95
2026-06-16 10:33:09 +02:00
Khwezi Mngoma 32eeb24558 Added caching to docker build stage
continuous-integration/drone/pr Build is passing
2026-06-16 10:32:25 +02:00
khwezi 5abe7a1476 Merge pull request 'ensured that untranslatable claims do not crash signalr' (#94) from cart into main
Reviewed-on: #94
2026-06-16 00:16:02 +02:00
Khwezi Mngoma bead8314da ensured that untranslatable claims do not crash signalr
continuous-integration/drone/pr Build is passing
2026-06-16 00:14:45 +02:00
2 changed files with 6 additions and 4 deletions
+2
View File
@@ -31,6 +31,8 @@ steps:
registry: nexus.khongisa.co.za registry: nexus.khongisa.co.za
repo: nexus.khongisa.co.za/midrandbooks repo: nexus.khongisa.co.za/midrandbooks
tags: [ latest, "1.${DRONE_BUILD_NUMBER}" ] tags: [ latest, "1.${DRONE_BUILD_NUMBER}" ]
use_cache: true
cache_from: nexus.khongisa.co.za/midrandbooks:latest
custom_labels: custom_labels:
- org.opencontainers.image.source=https://gitea.khongisa.co.za/litecharms/midrandbooks - org.opencontainers.image.source=https://gitea.khongisa.co.za/litecharms/midrandbooks
- org.opencontainers.image.version=1.${DRONE_BUILD_NUMBER} - org.opencontainers.image.version=1.${DRONE_BUILD_NUMBER}
+4 -4
View File
@@ -38,13 +38,13 @@ public sealed class HydrationService(AuthenticationStateProvider authStateProvid
if (existingCustomer.IsFailed) if (existingCustomer.IsFailed)
{ {
var name = User!.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Name)!.Value!; var name = User!.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Name)?.Value ?? string.Empty;
var lastname = User!.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Surname)!.Value!; var lastname = User!.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Surname)?.Value ?? string.Empty;
var mobile = User!.Claims.FirstOrDefault(c => c.Type == ClaimTypes.MobilePhone)!.Value!; var mobile = User!.Claims.FirstOrDefault(c => c.Type == ClaimTypes.MobilePhone)?.Value ?? string.Empty;
var customerCreate = await customerService.CreateCustomerAsync(new CreateCustomer { Email = email }, cancellationToken); var customerCreate = await customerService.CreateCustomerAsync(new CreateCustomer { Email = email }, cancellationToken);
if (customerCreate.IsSuccess) if (customerCreate.IsSuccess && !string.IsNullOrWhiteSpace(name))
{ {
ShoppingCart.CustomerId = customerCreate.Value; ShoppingCart.CustomerId = customerCreate.Value;