mirror of
https://github.com/luthermonson/go-proxmox.git
synced 2026-04-27 01:45:50 +03:00
[GH-ISSUE #215] (u *User) Update function does not follow API spec, always fails #61
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-proxmox#61
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kernel-sanders on GitHub (Sep 11, 2025).
Original GitHub issue: https://github.com/luthermonson/go-proxmox/issues/215
The user update function sends the full user object (a client plus every value return from a GET request) however a PUT requires we send a subset of this, and fails when extra fields are sent (i.e.
tokens). Without a new struct to send, the current user update function always results in a 400 error.GET /access/users/{userid} API docs:
User struct from types.go:
PUT /access/users/{userid} API docs:
The current user update function from access.go simply PUTs the entire user struct
UserOptions (would need to be created) struct to match the PUT API requirements:
The user update function would need to be updated to: