Skip to content

Commit 54984b4

Browse files
johnstcnmafredri
andauthored
Apply suggestions from code review
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
1 parent 3c5b15a commit 54984b4

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

cli/templateedit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func templateEdit() *cobra.Command {
6060
},
6161
}
6262

63-
cmd.Flags().StringVarP(&description, "description", "", "", "Edit the template deescription")
63+
cmd.Flags().StringVarP(&description, "description", "", "", "Edit the template description")
6464
cmd.Flags().DurationVarP(&maxTTL, "max_ttl", "", 0, "Edit the template maximum time before shutdown")
6565
cmd.Flags().DurationVarP(&minAutostartInterval, "min_autostart_interval", "", 0, "Edit the template minimum autostart interval")
6666
cliui.AllowSkipPrompt(cmd)

coderd/templates.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ func (api *API) patchTemplateMeta(rw http.ResponseWriter, r *http.Request) {
371371
}
372372
return nil
373373
})
374-
375374
if err != nil {
376375
httpapi.Write(rw, http.StatusInternalServerError, httpapi.Response{
377376
Message: "Internal error updating template metadata.",

codersdk/templates.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ type UpdateActiveTemplateVersion struct {
3232
}
3333

3434
type UpdateTemplateMeta struct {
35-
Description string `json:"description" validate:"omitempty"`
36-
MaxTTLMillis int64 `json:"max_ttl_ms" validate:"omitempty"`
37-
MinAutostartIntervalMillis int64 `json:"min_autostart_interval_ms" validate:"omitempty"`
35+
Description string `json:"description,omitempty"`
36+
MaxTTLMillis int64 `json:"max_ttl_ms,omitempty"`
37+
MinAutostartIntervalMillis int64 `json:"min_autostart_interval_ms,omitempty"`
3838
}
3939

4040
// Template returns a single template.

0 commit comments

Comments
 (0)