sync: Introduce repochecker-ack.txt to support check exceptions

This commit is contained in:
nemunaire 2022-10-29 17:03:57 +02:00
parent edde9f885d
commit fb368d79d1
17 changed files with 283 additions and 106 deletions

View file

@ -55,6 +55,16 @@ func GetTheme(id int64) (*Theme, error) {
return t, nil
}
// GetTheme retrieves a Theme from an given Exercice.
func (e *Exercice) GetTheme() (*Theme, error) {
t := &Theme{}
if err := DBQueryRow("SELECT id_theme, name, url_id, path, authors, intro, headline, image, partner_img, partner_href, partner_text FROM themes WHERE id_theme=?", e.IdTheme).Scan(&t.Id, &t.Name, &t.URLId, &t.Path, &t.Authors, &t.Intro, &t.Headline, &t.Image, &t.PartnerImage, &t.PartnerLink, &t.PartnerText); err != nil {
return t, err
}
return t, nil
}
// GetThemeByName retrieves a Theme from its title
func GetThemeByName(name string) (*Theme, error) {
t := &Theme{}