MCPcopy Index your code
hub / github.com/dnote/dnote / TouchLastLoginAt

Method TouchLastLoginAt

pkg/server/app/users.go:39–46  ·  view source on GitHub ↗

TouchLastLoginAt updates the last login timestamp

(user database.User, tx *gorm.DB)

Source from the content-addressed store, hash-verified

37
38// TouchLastLoginAt updates the last login timestamp
39func (a *App) TouchLastLoginAt(user database.User, tx *gorm.DB) error {
40 t := a.Clock.Now()
41 if err := tx.Model(&user).Update("last_login_at", &t).Error; err != nil {
42 return pkgErrors.Wrap(err, "updating last_login_at")
43 }
44
45 return nil
46}
47
48// CreateUser creates a user
49func (a *App) CreateUser(email, password string, passwordConfirmation string) (database.User, error) {

Callers 2

CreateUserMethod · 0.95
SignInMethod · 0.95

Calls 2

NowMethod · 0.65
UpdateMethod · 0.45

Tested by

no test coverage detected