mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: don't require an organization to read starter templates (#14190)
This commit is contained in:
+10
-3
@@ -472,9 +472,16 @@ type AgentStatsReportResponse struct {
|
||||
TxBytes int64 `json:"tx_bytes"`
|
||||
}
|
||||
|
||||
// TemplateExamples lists example templates embedded in coder.
|
||||
func (c *Client) TemplateExamples(ctx context.Context, organizationID uuid.UUID) ([]TemplateExample, error) {
|
||||
res, err := c.Request(ctx, http.MethodGet, fmt.Sprintf("/api/v2/organizations/%s/templates/examples", organizationID), nil)
|
||||
// TemplateExamples lists example templates available in Coder.
|
||||
//
|
||||
// Deprecated: Use StarterTemplates instead.
|
||||
func (c *Client) TemplateExamples(ctx context.Context, _ uuid.UUID) ([]TemplateExample, error) {
|
||||
return c.StarterTemplates(ctx)
|
||||
}
|
||||
|
||||
// StarterTemplates lists example templates available in Coder.
|
||||
func (c *Client) StarterTemplates(ctx context.Context) ([]TemplateExample, error) {
|
||||
res, err := c.Request(ctx, http.MethodGet, "/api/v2/templates/examples", nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user