feat: temp upload
This commit is contained in:
27
service/investigate/faker.go
Normal file
27
service/investigate/faker.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package investigate
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"nCovTrack-Backend/global"
|
||||
"nCovTrack-Backend/models"
|
||||
"nCovTrack-Backend/utils"
|
||||
)
|
||||
|
||||
func fakerGetRequest(uri string) string {
|
||||
resStr := utils.GetWhioutHeader(global.FACKER_HOST + uri)
|
||||
var res utils.GinResponse
|
||||
_ = json.Unmarshal([]byte(resStr), &res)
|
||||
dataStr, _ := json.Marshal(res.Data)
|
||||
return string(dataStr)
|
||||
}
|
||||
|
||||
func QueryHotelContacts() {
|
||||
dataStr := fakerGetRequest("query/contacts/hotel/320581199103182689")
|
||||
var data []models.HotelContactRequest
|
||||
err := json.Unmarshal([]byte(dataStr), &data)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
fmt.Println(data)
|
||||
}
|
||||
1
service/investigate/investigate.go
Normal file
1
service/investigate/investigate.go
Normal file
@@ -0,0 +1 @@
|
||||
package investigate
|
||||
Reference in New Issue
Block a user