remove sentry and move to slog

This commit is contained in:
Seraphim Strub 2023-11-05 16:03:52 +00:00
parent a20bc22ab1
commit 5d2b8f39d9
18 changed files with 134 additions and 232 deletions

View file

@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"io"
"log/slog"
"net/http"
"regexp"
)
@ -14,14 +15,16 @@ type UbisoftStruct struct {
idPrefix string
headers map[string]string
deals DealsMap
logger *slog.Logger
}
func NewUbsioftApi() UbisoftStruct {
func NewUbsioftApi(logger *slog.Logger) UbisoftStruct {
ubisoft := UbisoftStruct{
url: "https://free.ubisoft.com/configuration.js",
idPrefix: "ubisoft-",
headers: make(map[string]string),
deals: make(map[string]Deal),
logger: logger,
}
ubisoft.headers["referer"] = "https://free.ubisoft.com/"
ubisoft.headers["origin"] = "https://free.ubisoft.com"