MCPcopy Create free account
hub / github.com/dnote/dnote / GetAllUsers

Method GetAllUsers

pkg/server/app/users.go:120–128  ·  view source on GitHub ↗

GetAllUsers retrieves all users from the database

()

Source from the content-addressed store, hash-verified

118
119// GetAllUsers retrieves all users from the database
120func (a *App) GetAllUsers() ([]database.User, error) {
121 var users []database.User
122 err := a.DB.Find(&users).Error
123 if err != nil {
124 return nil, pkgErrors.Wrap(err, "finding users")
125 }
126
127 return users, nil
128}
129
130// Authenticate authenticates a user
131func (a *App) Authenticate(email, password string) (*database.User, error) {

Callers 2

userListCmdFunction · 0.80
TestGetAllUsersFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestGetAllUsersFunction · 0.64