fix: scope notifications by tenant
This commit is contained in:
@@ -58,11 +58,12 @@ type notificationTestWorker struct {
|
||||
func (w *notificationTestWorker) Work(ctx context.Context, job *river.Job[jobs_args.NotificationArgs]) error {
|
||||
arg := job.Args
|
||||
n := &models.Notification{
|
||||
UserID: arg.UserID,
|
||||
Type: arg.Type,
|
||||
Title: arg.Title,
|
||||
Content: arg.Content,
|
||||
IsRead: false,
|
||||
TenantID: arg.TenantID,
|
||||
UserID: arg.UserID,
|
||||
Type: arg.Type,
|
||||
Title: arg.Title,
|
||||
Content: arg.Content,
|
||||
IsRead: false,
|
||||
}
|
||||
return models.NotificationQuery.WithContext(ctx).Create(n)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user