dev
This commit is contained in:
parent
d4bf3e0efc
commit
0b44edc9e3
@ -3,6 +3,7 @@ package donat
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"donat-widget/internal/model"
|
"donat-widget/internal/model"
|
||||||
|
"fmt"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
@ -53,6 +54,7 @@ func GetDonat(donatService model.DonatService) echo.HandlerFunc {
|
|||||||
return func(request echo.Context) error {
|
return func(request echo.Context) error {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
streamerID, err := strconv.Atoi(request.Param("streamerID"))
|
streamerID, err := strconv.Atoi(request.Param("streamerID"))
|
||||||
|
fmt.Println(streamerID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error(err.Error())
|
slog.Error(err.Error())
|
||||||
return request.JSON(http.StatusInternalServerError, err.Error())
|
return request.JSON(http.StatusInternalServerError, err.Error())
|
||||||
|
@ -44,7 +44,7 @@ func GetTemplate1(
|
|||||||
let baseUrl = 'http://147.45.237.174:8002/api'
|
let baseUrl = 'http://147.45.237.174:8002/api'
|
||||||
|
|
||||||
async function getDonatInfo(streamerID) {
|
async function getDonatInfo(streamerID) {
|
||||||
let response = await fetch(baseUrl + '/widget/donat/get/' + streamerID);
|
let response = await fetch(baseUrl + '/widget/donat/get/' + String(streamerID));
|
||||||
let donat = await response.json();
|
let donat = await response.json();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user