Skip to content

Commit 1841e7f

Browse files
committed
fix: requires auth to get all users
1 parent 1914092 commit 1841e7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coderd/coderd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ func New(options *Options) (http.Handler, func()) {
138138
})
139139
})
140140
r.Route("/users", func(r chi.Router) {
141-
r.Get("/", api.getUsers)
142141
r.Get("/first", api.firstUser)
143142
r.Post("/first", api.postFirstUser)
144143
r.Post("/login", api.postLogin)
145144
r.Post("/logout", api.postLogout)
146145
r.Group(func(r chi.Router) {
147146
r.Use(httpmw.ExtractAPIKey(options.Database, nil))
148147
r.Post("/", api.postUsers)
148+
r.Get("/", api.getUsers)
149149
r.Route("/{user}", func(r chi.Router) {
150150
r.Use(httpmw.ExtractUserParam(options.Database))
151151
r.Get("/", api.userByName)

0 commit comments

Comments
 (0)