🐛 Fix send notification from api missing created at / updated at
This commit is contained in:
parent
6dc0f523e0
commit
7040b236e9
@ -4,6 +4,7 @@ using DysonNetwork.Sphere.Permission;
|
|||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using NodaTime;
|
||||||
|
|
||||||
namespace DysonNetwork.Sphere.Account;
|
namespace DysonNetwork.Sphere.Account;
|
||||||
|
|
||||||
@ -118,6 +119,8 @@ public class NotificationController(AppDatabase db, NotificationService nty) : C
|
|||||||
await nty.BroadcastNotification(
|
await nty.BroadcastNotification(
|
||||||
new Notification
|
new Notification
|
||||||
{
|
{
|
||||||
|
CreatedAt = SystemClock.Instance.GetCurrentInstant(),
|
||||||
|
UpdatedAt = SystemClock.Instance.GetCurrentInstant(),
|
||||||
Topic = request.Topic,
|
Topic = request.Topic,
|
||||||
Title = request.Title,
|
Title = request.Title,
|
||||||
Subtitle = request.Subtitle,
|
Subtitle = request.Subtitle,
|
||||||
@ -147,6 +150,8 @@ public class NotificationController(AppDatabase db, NotificationService nty) : C
|
|||||||
await nty.SendNotificationBatch(
|
await nty.SendNotificationBatch(
|
||||||
new Notification
|
new Notification
|
||||||
{
|
{
|
||||||
|
CreatedAt = SystemClock.Instance.GetCurrentInstant(),
|
||||||
|
UpdatedAt = SystemClock.Instance.GetCurrentInstant(),
|
||||||
Topic = request.Topic,
|
Topic = request.Topic,
|
||||||
Title = request.Title,
|
Title = request.Title,
|
||||||
Subtitle = request.Subtitle,
|
Subtitle = request.Subtitle,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user