feat: notification loginname (#381)

* feat: add login names to notify user

* feat: add login names to initial mail

* feat: add login names to initial mail
This commit is contained in:
Fabi
2020-07-07 19:31:51 +02:00
committed by GitHub
parent 5081ff21b0
commit 1c40d5645e
15 changed files with 320 additions and 93 deletions

View File

@@ -14,12 +14,19 @@ func (v *View) NotifyUserByID(userID string) (*model.NotifyUser, error) {
return view.NotifyUserByID(v.Db, notifyUserTable, userID)
}
func (v *View) PutNotifyUser(user *model.NotifyUser) error {
func (v *View) PutNotifyUser(user *model.NotifyUser, sequence uint64) error {
err := view.PutNotifyUser(v.Db, notifyUserTable, user)
if err != nil {
return err
}
return v.ProcessedNotifyUserSequence(user.Sequence)
if sequence != 0 {
return v.ProcessedNotifyUserSequence(sequence)
}
return nil
}
func (v *View) NotifyUsersByOrgID(orgID string) ([]*model.NotifyUser, error) {
return view.NotifyUsersByOrgID(v.Db, notifyUserTable, orgID)
}
func (v *View) DeleteNotifyUser(userID string, eventSequence uint64) error {