Kategorien und Produkte können zur DB hinzugefügt werden.

This commit is contained in:
2023-11-20 15:51:42 +01:00
parent a87b0b3979
commit 5340963ac2
12 changed files with 330 additions and 19 deletions

View File

@@ -21,3 +21,12 @@ func GetSection(db *gorm.DB) ([]Section, error) {
}
return sections, nil
}
func GetSectionByID(db *gorm.DB, id string) (Section, error) {
var section Section
err := db.Debug().Model(&Section{}).Where("id = ?", id).Find(&section).Error
if err != nil {
}
return section, nil
}