ipn/ipnlocal: use PATCH for EditPrefs, not POST

Addendum to earlier 00d641d9fc.

Reserve POST for SetPrefs in the future.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-04-11 20:49:07 -07:00
parent 4b47393e0c
commit 79109f4965
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -219,7 +219,7 @@ func EditPrefs(ctx context.Context, mp *ipn.MaskedPrefs) (*ipn.Prefs, error) {
if err != nil {
return nil, err
}
body, err := send(ctx, "POST", "/localapi/v0/prefs", http.StatusOK, bytes.NewReader(mpj))
body, err := send(ctx, "PATCH", "/localapi/v0/prefs", http.StatusOK, bytes.NewReader(mpj))
if err != nil {
return nil, err
}