Skip to content

Commit 5cfdabb

Browse files
committed
fix regexp for api endpoint urls
1 parent ead11dd commit 5cfdabb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/apiserver/apiserver.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ type Server struct {
4646
}
4747

4848
var (
49-
clusterStatusURL = regexp.MustCompile(`^/clusters/(?P<team>[a-zA-Z][a-zA-Z0-9]*)/(?P<cluster>[a-zA-Z][a-zA-Z0-9]*)/?$`)
50-
clusterLogsURL = regexp.MustCompile(`^/clusters/(?P<team>[a-zA-Z][a-zA-Z0-9]*)/(?P<cluster>[a-zA-Z][a-zA-Z0-9]*)/logs/?$`)
51-
clusterHistoryURL = regexp.MustCompile(`^/clusters/(?P<team>[a-zA-Z][a-zA-Z0-9]*)/(?P<cluster>[a-zA-Z][a-zA-Z0-9]*)/history/?$`)
49+
clusterStatusURL = regexp.MustCompile(`^/clusters/(?P<team>[a-zA-Z][a-zA-Z0-9]*)/(?P<cluster>[a-zA-Z][a-zA-Z0-9-]*)/?$`)
50+
clusterLogsURL = regexp.MustCompile(`^/clusters/(?P<team>[a-zA-Z][a-zA-Z0-9]*)/(?P<cluster>[a-zA-Z][a-zA-Z0-9-]*)/logs/?$`)
51+
clusterHistoryURL = regexp.MustCompile(`^/clusters/(?P<team>[a-zA-Z][a-zA-Z0-9]*)/(?P<cluster>[a-zA-Z][a-zA-Z0-9-]*)/history/?$`)
5252
teamURL = regexp.MustCompile(`^/clusters/(?P<team>[a-zA-Z][a-zA-Z0-9]*)/?$`)
5353
workerLogsURL = regexp.MustCompile(`^/workers/(?P<id>\d+)/logs/?$`)
5454
workerEventsQueueURL = regexp.MustCompile(`^/workers/(?P<id>\d+)/queue/?$`)

pkg/cluster/pg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ func (c *Cluster) readPgUsersFromDatabase(userNames []string) (users spec.PgUser
8585
if err2 := rows.Close(); err2 != nil {
8686
err = fmt.Errorf("error when closing query cursor: %v", err2)
8787
}
88-
8988
}()
89+
9090
for rows.Next() {
9191
var (
9292
rolname, rolpassword string

0 commit comments

Comments
 (0)