feat(templates): Get static mounted images

This commit is contained in:
niggl committed 2024-12-03 19:56:57 +01:00
1 parent d910a722df
commit 4deda8adf1
4 files changed
+13 -5

No files matched your search

+5 -1
View File
@@ -81,7 +81,11 @@ func (t *DefaultTemplater) GenerateBarcode(code string, format string, prefix st
}
func (t *DefaultTemplater) SelectSponsorImage(id int) (string, error) {
return templates.GetImage("error"), nil
sponsors := []string{
"sponsoringheader",
"odit",
}
return templates.GetImage(sponsors[id%len(sponsors)]), nil
}
func (t *DefaultTemplater) StringToTemplate(templateString string) (*template.Template, error) {