if develmode, relative links for emoji

This commit is contained in:
Ted Unangst 2023-08-26 17:42:14 -04:00
parent 0ba146c00c
commit 86738e30b8
1 changed files with 3 additions and 0 deletions

3
fun.go
View File

@ -432,6 +432,9 @@ var emucache = cache.New(cache.Options{Filler: func(ename string) (Emu, bool) {
continue continue
} }
url := fmt.Sprintf("https://%s/emu/%s%s", serverName, fname, ext) url := fmt.Sprintf("https://%s/emu/%s%s", serverName, fname, ext)
if develMode {
url = fmt.Sprintf("/emu/%s%s", fname, ext)
}
return Emu{ID: url, Name: ename, Type: "image/" + ext[1:]}, true return Emu{ID: url, Name: ename, Type: "image/" + ext[1:]}, true
} }
return Emu{Name: ename, ID: "", Type: "image/png"}, true return Emu{Name: ename, ID: "", Type: "image/png"}, true