Skip to content

Commit d530bb0

Browse files
committed
Rename new uses of required params
1 parent 9d79cd1 commit d530bb0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

coderd/users.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ func (api *API) userByName(rw http.ResponseWriter, r *http.Request) {
583583
func (api *API) userAutofillParameters(rw http.ResponseWriter, r *http.Request) {
584584
user := httpmw.UserParam(r)
585585

586-
p := httpapi.NewQueryParamParser().Required("template_id")
586+
p := httpapi.NewQueryParamParser().RequiredNotEmpty("template_id")
587587
templateID := p.UUID(r.URL.Query(), uuid.UUID{}, "template_id")
588588
p.ErrorExcessParams(r.URL.Query())
589589
if len(p.Errors) > 0 {

enterprise/coderd/jfrog.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ func (api *API) jFrogXrayScan(rw http.ResponseWriter, r *http.Request) {
6767
ctx = r.Context()
6868
vals = r.URL.Query()
6969
p = httpapi.NewQueryParamParser()
70-
wsID = p.Required("workspace_id").UUID(vals, uuid.UUID{}, "workspace_id")
71-
agentID = p.Required("agent_id").UUID(vals, uuid.UUID{}, "agent_id")
70+
wsID = p.RequiredNotEmpty("workspace_id").UUID(vals, uuid.UUID{}, "workspace_id")
71+
agentID = p.RequiredNotEmpty("agent_id").UUID(vals, uuid.UUID{}, "agent_id")
7272
)
7373

7474
if len(p.Errors) > 0 {

0 commit comments

Comments
 (0)