MCPcopy Create free account
hub / github.com/gotify/server / GetApplicationsByUser

Method GetApplicationsByUser

database/application.go:64–71  ·  view source on GitHub ↗

GetApplicationsByUser returns all applications from a user.

(userID uint)

Source from the content-addressed store, hash-verified

62
63// GetApplicationsByUser returns all applications from a user.
64func (d *GormDatabase) GetApplicationsByUser(userID uint) ([]*model.Application, error) {
65 var apps []*model.Application
66 err := d.DB.Where("user_id = ?", userID).Order("sort_key, id ASC").Find(&apps).Error
67 if err == gorm.ErrRecordNotFound {
68 err = nil
69 }
70 return apps, err
71}
72
73// UpdateApplication updates an application.
74func (d *GormDatabase) UpdateApplication(app *model.Application) error {

Callers 2

DeleteMessagesByUserMethod · 0.95
DeleteUserByIDMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected