fix
This commit is contained in:
@@ -85,6 +85,7 @@ func (repo *PGrepo) GetLicenseWithId(id int) (models.License, error) {
|
||||
}
|
||||
defer rows.Close()
|
||||
var license models.License
|
||||
rows.Next()
|
||||
err = rows.Scan(&license.ID, &license.Name)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
@@ -98,6 +99,7 @@ func (repo *PGrepo) GetCategoryWithId(id int) (models.Category, error) {
|
||||
}
|
||||
defer rows.Close()
|
||||
var category models.Category
|
||||
rows.Next()
|
||||
err = rows.Scan(&category.ID, &category.Name)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
|
||||
Reference in New Issue
Block a user