Closed billypap1 closed 2 years ago
Hello, i use this library in order to perform operations to my Supabase database. I have connected to db with the client:
var ( headers = map[string]string{"Authorization": fmt.Sprintf("Bearer %s", tokenApi), "apikey": tokenApi} ) client := postgrest.NewClient("https://<projectID>.supabase.co/rest/v1/", "public", headers)
And I update the table like this:
info, count, err := client.From("testTable").Update(map[string]string{"state": "offline"}, "", "").Match(map[string]string{"member": "comid"}).ExecuteString() fmt.Println(info) -> [{"id":1,"member":"comid","avatar":"asdasd","state":"offline"}] fmt.Println(count) fmt.Println(err)
I'm not getting any error and it returns the response in string, but the column "state" in db doesn't update to "offline".
Fixed it, my mistake, wrong api key
Hello, i use this library in order to perform operations to my Supabase database. I have connected to db with the client:
And I update the table like this:
I'm not getting any error and it returns the response in string, but the column "state" in db doesn't update to "offline".