🗃️ Fix notification push subscription unique key
This commit is contained in:
@ -27,7 +27,7 @@ public enum NotificationPushProvider
|
||||
Google
|
||||
}
|
||||
|
||||
[Index(nameof(DeviceToken), nameof(DeviceId), IsUnique = true)]
|
||||
[Index(nameof(DeviceToken), nameof(DeviceId), nameof(AccountId), IsUnique = true)]
|
||||
public class NotificationPushSubscription : ModelBase
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
@ -36,7 +36,6 @@ public class NotificationService(
|
||||
// Reset these audit fields to renew the lifecycle of this device token
|
||||
existingSubscription.DeviceId = deviceId;
|
||||
existingSubscription.DeviceToken = deviceToken;
|
||||
existingSubscription.UpdatedAt = SystemClock.Instance.GetCurrentInstant();
|
||||
db.Update(existingSubscription);
|
||||
await db.SaveChangesAsync();
|
||||
return existingSubscription;
|
||||
|
Reference in New Issue
Block a user