This commit is contained in:
stud162129 2024-07-04 22:23:07 +03:00
parent 94de387e19
commit 3e2afe61b3
2 changed files with 8 additions and 0 deletions

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -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)