We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentbc18c5d commiteae0d20Copy full SHA for eae0d20
codersdk/organizations.go
@@ -364,7 +364,8 @@ func (c *Client) TemplatesByOrganization(ctx context.Context, organizationID uui
364
}
365
366
typeTemplateFilterstruct {
367
-OrganizationID uuid.UUID
+OrganizationID uuid.UUID`json:"organization_id,omitempty" typescript:"-"`
368
+FilterQuerystring`json:"q,omitempty"`
369
370
371
// asRequestOption returns a function that can be used in (*Client).Request.
@@ -378,6 +379,11 @@ func (f TemplateFilter) asRequestOption() RequestOption {
378
379
params=append(params,fmt.Sprintf("organization:%q",f.OrganizationID.String()))
380
381
382
+iff.FilterQuery!="" {
383
+// If custom stuff is added, just add it on here.
384
+params=append(params,f.FilterQuery)
385
+}
386
+
387
q:=r.URL.Query()
388
q.Set("q",strings.Join(params," "))
389
r.URL.RawQuery=q.Encode()