Compare commits

7 Commits

Author SHA1 Message Date
31efd6b4ad Merge pull request 'Prod: Better debug create consumption error due to datetime' (#12) from main into production
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #12
2025-10-16 17:33:53 +02:00
f248be4e1f Merge pull request 'Seq API Key support and package updates' (#10) from prepare-for-prod into production
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #10
2025-09-21 11:52:08 +02:00
67d29333d9 Merge branch 'production' into prepare-for-prod
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
# Conflicts:
#	.drone.yml
2025-09-21 11:48:42 +02:00
c57972d9a6 Docker push and build for production branch as well
All checks were successful
continuous-integration/drone/push Build is passing
2025-08-19 18:59:01 +02:00
ea019ebfa6 Merge pull request '[PROD] Add seq support' (#7) from main into production
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #7
2025-08-19 18:56:10 +02:00
66c23ffb4f Merge pull request 'Use full type as log category' (#5) from main into production
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #5
2025-07-21 21:42:57 +02:00
00e0869a13 Merge pull request '[Prod] More logging' (#4) from main into production
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #4
2025-07-21 21:25:21 +02:00
3 changed files with 7 additions and 9 deletions

View File

@@ -42,11 +42,9 @@ steps:
- name: docker build and push - name: docker build and push
image: docker:24.0.7 image: docker:24.0.7
commands: commands:
- dockerImageWithTag="$docker_registry$docker_repo:$DRONE_BRANCH" - docker build . -t $docker_registry$docker_repo:$DRONE_BRANCH
- docker build . -t $dockerImageWithTag
- echo $docker_password | docker login --username $docker_username --password-stdin $docker_registry - echo $docker_password | docker login --username $docker_username --password-stdin $docker_registry
- docker push $dockerImageWithTag - docker push $docker_registry$docker_repo:$DRONE_BRANCH
- echo "Built and pushed $dockerImageWithTag"
environment: environment:
docker_username: docker_username:
from_secret: docker_username from_secret: docker_username

View File

@@ -26,13 +26,13 @@ public static class CreateConsumption
{ {
public Validator(TimeProvider timeProvider) public Validator(TimeProvider timeProvider)
{ {
Func<DateTimeOffset> getTodayEndOfDay = () => timeProvider.GetUtcNow() DateTime todayEndOfDay = timeProvider.GetUtcNow()
.Date .Date
.AddDays(1) .AddDays(1)
.AddTicks(-1); .AddTicks(-1);
RuleFor(x => x.DateTime.ToUniversalTime()) RuleFor(x => x.DateTime.ToUniversalTime())
.LessThanOrEqualTo(_ => getTodayEndOfDay()) .LessThanOrEqualTo(todayEndOfDay)
.WithName(nameof(Request.DateTime)); .WithName(nameof(Request.DateTime));
RuleFor(x => x.Distance) RuleFor(x => x.Distance)

View File

@@ -26,13 +26,13 @@ public static class UpdateConsumption
{ {
public Validator(TimeProvider timeProvider) public Validator(TimeProvider timeProvider)
{ {
Func<DateTimeOffset> getTodayEndOfDay = () => timeProvider.GetUtcNow() DateTime todayEndOfDay = timeProvider.GetUtcNow()
.Date .Date
.AddDays(1) .AddDays(1)
.AddTicks(-1); .AddTicks(-1);
RuleFor(x => x.DateTime.ToUniversalTime()) RuleFor(x => x.DateTime.ToUniversalTime())
.LessThanOrEqualTo(_ => getTodayEndOfDay()) .LessThanOrEqualTo(todayEndOfDay)
.WithName(nameof(Request.DateTime)); .WithName(nameof(Request.DateTime));
RuleFor(x => x.Distance) RuleFor(x => x.Distance)