Skip to content

Commit

Permalink
Merge pull request #230 from Tobeyw/dev-mindy
Browse files Browse the repository at this point in the history
add log
  • Loading branch information
Tobeyw committed Dec 19, 2023
2 parents 37fce3c + efa0278 commit f6b28ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion neo3fura_http/biz/api/src.GetInfoByNFT.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"
"fmt"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"io/ioutil"
Expand Down Expand Up @@ -245,14 +246,15 @@ func GetNNSByAddress(address string) (string, string, error) {
} else if rt == "test" {
url = "https://megaoasis.ngd.network:8889/profile/get?address=" //test
}

fmt.Println(url)
resp, err := http.Get(url + address)
if err != nil {
return "", "", err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
var nns, userName string
fmt.Println("body:", string(body))
if string(body) != "" && string(body) != "null" {
var data map[string]interface{}
err = json.Unmarshal(body, &data)
Expand Down

0 comments on commit f6b28ed

Please sign in to comment.