mirror of
https://github.com/pushbits/server.git
synced 2025-06-08 21:51:59 +02:00
Add misspell, gocritic, and revive
This commit is contained in:
parent
5e640800fe
commit
2c20e42a21
30 changed files with 79 additions and 43 deletions
|
@ -25,16 +25,16 @@ func (d *Database) UpdateApplication(application *model.Application) error {
|
|||
}
|
||||
|
||||
// GetApplicationByID returns the application with the given ID or nil.
|
||||
func (d *Database) GetApplicationByID(ID uint) (*model.Application, error) {
|
||||
func (d *Database) GetApplicationByID(id uint) (*model.Application, error) {
|
||||
var application model.Application
|
||||
|
||||
err := d.gormdb.First(&application, ID).Error
|
||||
err := d.gormdb.First(&application, id).Error
|
||||
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
assert.Assert(application.ID == ID)
|
||||
assert.Assert(application.ID == id)
|
||||
|
||||
return &application, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue