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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy