Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit62c1ada

Browse files
committed
oh boy redux
1 parent579525d commit62c1ada

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎enterprise/coderd/provisionerdaemons.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,16 @@ func (api *API) provisionerDaemonServe(rw http.ResponseWriter, r *http.Request)
241241
apiVersion=qv
242242
}
243243

244+
iferr:=proto.CurrentVersion.Validate(apiVersion);err!=nil {
245+
httpapi.Write(ctx,rw,http.StatusBadRequest, codersdk.Response{
246+
Message:"Incompatible or unparsable version",
247+
Validations: []codersdk.ValidationError{
248+
{Field:"version",Detail:err.Error()},
249+
},
250+
})
251+
return
252+
}
253+
244254
// Create the daemon in the database.
245255
now:=dbtime.Now()
246256
daemon,err:=api.Database.UpsertProvisionerDaemon(authCtx, database.UpsertProvisionerDaemonParams{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp