It shows this error Post "/rest/v1/emails": unsupported protocol scheme "" when deploying from render.com server but it works fine locally. I don't know where the problem is
type Emaildb struct {
Name string `json:"name"`
Subject string `json:"subject"`
To string `json:"to"`
Text string `json:"text"`
Date string `json:"date"`
}
func AddMail(m Emaildb) {
supabaseUrl := os.Getenv("SUPABASE_URL")
supabaseKey := os.Getenv("SUPABASE_PRIVATE_KEY_SERVICE_ROLE")
supabase := supa.CreateClient(supabaseUrl, supabaseKey)
var results []types.Email
err := supabase.DB.From("emails").Insert(m).Execute(&results)
if err != nil {
fmt.Println("cant insert email to db" + err.Error())
}
fmt.Println(results)
}
It shows this error
Post "/rest/v1/emails": unsupported protocol scheme ""
when deploying fromrender.com
server but it works fine locally. I don't know where the problem is