I have a Firebase database that looks like this:
{
"users" : [ null, {
"name" : "John",
"recipes" : {
"34" : {
"name" : "Chicken Parmesan"
}
}
} ]
}
I'm trying to access the data through a Golang API. When I'm running the API locally, it works. However, when I try to use the API on AppEngine, Firebase returns null.
This is how I'm calling it:
userID := req.URL.Query().Get("user_id")
// Make call to API or to Database here, and then write out results
var user interface{}
f.Auth(<FIREBASE_SECRET>)
if err := f.Child("users/" + userID).Value(&user); err != nil {
fmt.Print(w, err)
}
json.NewEncoder(w).Encode(user)
Any ideas on why this may not be working?