Skip to content

Commit

Permalink
Consumer API: internal server error on register for push notification…
Browse files Browse the repository at this point in the history
…s when environment is passed (#451)

* fix: use In validator correctly

* chore: remove unused using directive
  • Loading branch information
tnotheis authored Dec 14, 2023
1 parent ac73a3e commit 28ea4fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Backbone.Modules.Devices.Domain.Aggregates.PushNotifications;
using MediatR;
using MediatR;

namespace Backbone.Modules.Devices.Application.PushNotifications.Commands.UpdateDeviceRegistration;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public UpdateDeviceRegistrationValidator()
{
RuleFor(dto => dto.Platform).In("fcm", "apns");

RuleFor(dto => dto.Environment).In("Development", "Production", null);
RuleFor(dto => dto.Environment).In("Development", "Production").When(dto => dto.Environment != null);

RuleFor(dto => dto.Handle)
.DetailedNotEmpty()
Expand Down

0 comments on commit 28ea4fb

Please sign in to comment.