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

Method GetApplicationByID

database/application.go:26–36  ·  view source on GitHub ↗

GetApplicationByID returns the application for the given id or nil.

(id uint)

Source from the content-addressed store, hash-verified

24
25// GetApplicationByID returns the application for the given id or nil.
26func (d *GormDatabase) GetApplicationByID(id uint) (*model.Application, error) {
27 app := new(model.Application)
28 err := d.DB.Where("id = ?", id).Find(app).Error
29 if err == gorm.ErrRecordNotFound {
30 err = nil
31 }
32 if app.ID == id {
33 return app, err
34 }
35 return nil, err
36}
37
38// CreateApplication creates an application.
39func (d *GormDatabase) CreateApplication(application *model.Application) error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected