started adding user info

This commit is contained in:
2024-04-03 15:04:57 +02:00
parent 12e65345a2
commit a1849bbde4
4 changed files with 243 additions and 4 deletions

View File

@@ -135,7 +135,6 @@ func int64Ptr(i int64) *int64 {
}
func hexToDecimal(hexColor string) int {
// Remove the hash symbol if it's present
hexColor = strings.TrimPrefix(hexColor, "#")
decimal, err := strconv.ParseInt(hexColor, 16, 64)
if err != nil {
@@ -144,6 +143,11 @@ func hexToDecimal(hexColor string) int {
return int(decimal)
}
func decimalToHex(decimal int) string {
hexString := strconv.FormatInt(int64(decimal), 16)
return hexString
}
func simpleGetFromAPI(key string, url string) interface{} {
client := &http.Client{}
req, err := http.NewRequest("GET", url, nil)