supabase-community / gotrue-csharp

C# implementation of Supabase's GoTrue
https://supabase-community.github.io/gotrue-csharp/api/Supabase.Gotrue.Client.html
MIT License
39 stars 27 forks source link

Update user not working #3

Closed elrhomariyounes closed 3 years ago

elrhomariyounes commented 3 years ago

Bug report

Describe the bug

Hello, I was trying to update user data, but the request failed, the Gotrue API returns a 405 Status Code (Method Not Allowed), after debugging i found that we are calling the update method from the API object we are sending a request to a wrong route "/recover" instead we should call "/user" please check here.

I will submit PR to fix. Thank you very much.

To Reproduce

  1. SignIn an existing user or SignUp
  2. Call update method to change the user metadata for example
    var attributes = new UserAttributes
    {
    Data = new Dictionary<string, object>
    {
            {"hello", "world" }
    }
    };
    await client.Update(attributes);

Expected behavior

System information