diff --git a/internal/model/widget-templates.go b/internal/model/widget-templates.go index 36540ef..9e88d26 100644 --- a/internal/model/widget-templates.go +++ b/internal/model/widget-templates.go @@ -87,7 +87,7 @@ async function endDonat(donatID) { while (contentDiv.firstChild) { contentDiv.removeChild(contentDiv.firstChild); } - let response = await fetch(baseUrl + '/donat/view/' + String(donatID), {method: 'POST'}); + let response = await fetch(baseUrl + '/widget/donat/view/' + String(donatID), {method: 'POST'}); } let audio; @@ -109,8 +109,10 @@ async function widgetView() { let widget = await getWidgetInfo(widgetID) console.log(donat); console.log(widget); - - addImage(widget.ImageUrl) + if (widget.ImageUrl != "") { + addImage(widget.ImageUrl) + } + addAudio(widget.AudioUrl) addText(donat.Text + " " + donat.Amount)