mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
chore(coderd): extract api version validation to util package (#11407)
This commit is contained in:
@ -1180,7 +1180,7 @@ func (api *API) workspaceAgentClientCoordinate(rw http.ResponseWriter, r *http.R
|
||||
if qv != "" {
|
||||
version = qv
|
||||
}
|
||||
if err := tailnet.ValidateVersion(version); err != nil {
|
||||
if err := tailnet.CurrentVersion.Validate(version); err != nil {
|
||||
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
|
||||
Message: "Unknown or unsupported API version",
|
||||
Validations: []codersdk.ValidationError{
|
||||
|
Reference in New Issue
Block a user