mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
feat: implement data retention mechanism
This commit is contained in:
@@ -208,6 +208,11 @@ func (srv *SummaryService) DeleteByUser(userId string) error {
|
||||
return srv.repository.DeleteByUser(userId)
|
||||
}
|
||||
|
||||
func (srv *SummaryService) DeleteByUserBefore(userId string, t time.Time) error {
|
||||
srv.invalidateUserCache(userId)
|
||||
return srv.repository.DeleteByUserBefore(userId, t)
|
||||
}
|
||||
|
||||
func (srv *SummaryService) Insert(summary *models.Summary) error {
|
||||
srv.invalidateUserCache(summary.UserID)
|
||||
return srv.repository.Insert(summary)
|
||||
|
Reference in New Issue
Block a user