Skip to content

Commit 4a98119

Browse files
committed
remove seen notifications from audit
1 parent 3e55b11 commit 4a98119

2 files changed

Lines changed: 0 additions & 21 deletions

File tree

server/app/events.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -251,22 +251,6 @@ func (a *App) logCardAdded(userID, last4digits string) error {
251251
return nil
252252
}
253253

254-
func (a *App) logNotificationSeen(userID string, notificationID int) error {
255-
event := models.AuditEvent{
256-
UserID: userID,
257-
Action: "seen_notification",
258-
Role: string(userRole),
259-
Timestamp: time.Now(),
260-
Metadata: fmt.Sprintf("Notification %v is seen", notificationID),
261-
}
262-
263-
if err := a.db.CreateAuditEvent(&event); err != nil {
264-
return errors.Wrapf(err, "Failed to log audit event: %s", event.Action)
265-
}
266-
267-
return nil
268-
}
269-
270254
func (a *App) logVoucherBalanceUpdate(userID, currency string, role role, balance float64) error {
271255
event := models.AuditEvent{
272256
UserID: userID,

server/app/notification_handler.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ func (a *App) UpdateNotificationsHandler(req *http.Request) (interface{}, Respon
7676
return nil, InternalServerError(errors.New(internalServerErrorMsg))
7777
}
7878

79-
if err := a.logNotificationSeen(userID, id); err != nil {
80-
log.Error().Err(err).Send()
81-
return nil, InternalServerError(errors.New(internalServerErrorMsg))
82-
}
83-
8479
return ResponseMsg{
8580
Message: "Notifications are updated",
8681
Data: nil,

0 commit comments

Comments
 (0)