3 Commits

Author SHA1 Message Date
bfc17b45d4 Fix JSON tag for setImage 2024-06-28 19:07:50 +09:30
4d2ebbd805 This does not need context 2024-06-28 18:59:10 +09:30
5b349724eb Correct func name 2024-06-28 18:56:33 +09:30
2 changed files with 3 additions and 3 deletions

View File

@@ -158,12 +158,12 @@ type ESSetImage struct {
}
type ESSetImagePayload struct {
Image string `json:"title"`
Image string `json:"image"`
Target EventTarget `json:"target"`
State int `json:"state"`
}
func NewESSetImagePayload(context string, imageBase64 string, target EventTarget, state int) ESSetImage {
func NewESSetImage(context string, imageBase64 string, target EventTarget, state int) ESSetImage {
return ESSetImage{
ESCommon: ESCommon{
Event: "setImage",

View File

@@ -24,6 +24,6 @@ func ImageToPayload(i image.Image) string {
// SVGToPayload create the string necessary to send an SVG
// via a ESSetImage struct
func SVGToPayload(context string, svg string) string {
func SVGToPayload(svg string) string {
return "data:image/svg+xml;charset=utf8," + svg
}