mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
coderd: autostart: codersdk, http api, database plumbing (#879)
* feat: add columns autostart_schedule, autostop_schedule to database schema * feat: database: add UpdateWorkspaceAutostart and UpdateWorkspaceAutostop methods * feat: add AutostartSchedule/AutostopSchedule to api workspace struct * feat: codersdk: implement update workspace autostart and autostop methods * chore: add unit tests for workspace autostarat and autostop methods
This commit is contained in:
@ -184,6 +184,12 @@ func New(options *Options) (http.Handler, func()) {
|
||||
r.Post("/", api.postWorkspaceBuilds)
|
||||
r.Get("/{workspacebuildname}", api.workspaceBuildByName)
|
||||
})
|
||||
r.Route("/autostart", func(r chi.Router) {
|
||||
r.Put("/", api.putWorkspaceAutostart)
|
||||
})
|
||||
r.Route("/autostop", func(r chi.Router) {
|
||||
r.Put("/", api.putWorkspaceAutostop)
|
||||
})
|
||||
})
|
||||
r.Route("/workspacebuilds/{workspacebuild}", func(r chi.Router) {
|
||||
r.Use(
|
||||
|
Reference in New Issue
Block a user