Skip to content

Commit

Permalink
merge in main and address conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
KellyMerrick committed Sep 26, 2023
2 parents 397584e + a22924d commit 9d9772d
Show file tree
Hide file tree
Showing 19 changed files with 302 additions and 37 deletions.
56 changes: 56 additions & 0 deletions api/queue/queue.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright (c) 2023 Target Brands, Inc. All rights reserved.
//
// Use of this source code is governed by the LICENSE file in this repository.

package queue

import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/go-vela/server/router/middleware/claims"
"github.com/go-vela/types/library"
"github.com/sirupsen/logrus"
)

// swagger:operation POST /api/v1/queue/info queue Info
//
// Get queue credentials
//
// ---
// produces:
// - application/json
// security:
// - ApiKeyAuth: []
// responses:
// '200':
// description: Successfully retrieved queue credentials
// schema:
// "$ref": "#/definitions/QueueInfo"
// '401':
// description: Unauthorized
// schema:
// "$ref": "#/definitions/Error"

// Info represents the API handler to
// retrieve queue credentials as part of worker onboarding.
func Info(c *gin.Context) {
cl := claims.Retrieve(c)

logrus.WithFields(logrus.Fields{
"user": cl.Subject,
}).Info("requesting queue credentials with registration token")

// extract the public key that was packed into gin context
k := c.MustGet("public-key").(string)

// extract the queue-address that was packed into gin context
a := c.MustGet("queue-address").(string)

wr := library.QueueInfo{
QueuePublicKey: &k,
QueueAddress: &a,
}

c.JSON(http.StatusOK, wr)
}
1 change: 1 addition & 0 deletions cmd/vela-server/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func setupQueue(c *cli.Context) (queue.Service, error) {
Routes: c.StringSlice("queue.routes"),
Timeout: c.Duration("queue.pop.timeout"),
PrivateKey: c.String("queue.private-key"),
PublicKey: c.String("queue.public-key"),
}

// setup the queue
Expand Down
2 changes: 2 additions & 0 deletions cmd/vela-server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ func server(c *cli.Context) error {
middleware.Secrets(secrets),
middleware.Scm(scm),
middleware.QueueSigningPrivateKey(c.String("queue.private-key")),
middleware.QueueSigningPublicKey(c.String("queue.public-key")),
middleware.QueueAddress(c.String("queue.addr")),
middleware.Allowlist(c.StringSlice("vela-repo-allowlist")),
middleware.DefaultBuildLimit(c.Int64("default-build-limit")),
middleware.DefaultTimeout(c.Int64("default-build-timeout")),
Expand Down
10 changes: 7 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ services:
VELA_WEBUI_ADDR: 'http://localhost:8888'
VELA_LOG_LEVEL: trace
VELA_LOG_FORMATTER: json
# comment the line below to use registration flow
VELA_SECRET: 'zB7mrKDTZqNeNTD8z47yG4DHywspAh'
QUEUE_PUBLIC_KEY: 'DXsJkoTSkHlG26d75LyHJG+KQsXPr8VKPpmH/78zmko='
VELA_SERVER_PRIVATE_KEY: 'F534FF2A080E45F38E05DC70752E6787'
VELA_USER_REFRESH_TOKEN_DURATION: 90m
VELA_USER_ACCESS_TOKEN_DURATION: 60m
VELA_WORKER_AUTH_TOKEN_DURATION: 3m
VELA_DISABLE_WEBHOOK_VALIDATION: 'true'
VELA_ENABLE_SECURE_COOKIE: 'false'
VELA_REPO_ALLOWLIST: '*'
Expand All @@ -56,6 +59,7 @@ services:
- redis
- vault


# The `worker` compose service hosts the Vela build daemon.
#
# This component is used for pulling builds from the FIFO
Expand All @@ -70,17 +74,17 @@ services:
environment:
EXECUTOR_DRIVER: linux
QUEUE_DRIVER: redis
QUEUE_ADDR: 'redis://redis:6379'
QUEUE_PUBLIC_KEY: 'DXsJkoTSkHlG26d75LyHJG+KQsXPr8VKPpmH/78zmko='
VELA_BUILD_LIMIT: 1
VELA_BUILD_TIMEOUT: 30m
VELA_LOG_LEVEL: trace
VELA_RUNTIME_DRIVER: docker
VELA_RUNTIME_PRIVILEGED_IMAGES: 'target/vela-docker'
VELA_EXECUTOR_ENFORCE_TRUSTED_REPOS: 'true'
VELA_SERVER_ADDR: 'http://server:8080'
# comment the 3 lines below to use registration flow
VELA_SERVER_SECRET: 'zB7mrKDTZqNeNTD8z47yG4DHywspAh'
WORKER_ADDR: 'http://worker:8080'
WORKER_CHECK_IN: 5m
WORKER_CHECK_IN: 2m
restart: always
ports:
- '8081:8080'
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/go-vela/server

go 1.19
go 1.21

require (
github.com/Bose/minisentinel v0.0.0-20200130220412-917c5a9223bb
Expand All @@ -14,7 +14,7 @@ require (
github.com/drone/envsubst v1.0.3
github.com/gin-gonic/gin v1.9.1
github.com/go-playground/assert/v2 v2.2.0
github.com/go-vela/types v0.20.2-0.20230822144153-14b37585731d
github.com/go-vela/types v0.20.2-0.20230922185343-b83bcddfa60d
github.com/golang-jwt/jwt/v5 v5.0.0
github.com/google/go-cmp v0.5.9
github.com/google/go-github/v54 v54.0.0
Expand Down
12 changes: 10 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bsm/ginkgo/v2 v2.9.5 h1:rtVBYPs3+TC5iLUVOis1B9tjLTup7Cj5IfzosKtvTJ0=
github.com/bsm/ginkgo/v2 v2.9.5/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y=
github.com/bsm/gomega v1.26.0/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
github.com/buildkite/yaml v0.0.0-20181016232759-0caa5f0796e3 h1:q+sMKdA6L8LyGVudTkpGoC73h6ak2iWSPFiFo/pFOU8=
github.com/buildkite/yaml v0.0.0-20181016232759-0caa5f0796e3/go.mod h1:5hCug3EZaHXU3FdCA3gJm0YTNi+V+ooA2qNTiVpky4A=
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
Expand Down Expand Up @@ -143,8 +145,9 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91
github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw=
github.com/go-vela/types v0.20.2-0.20230822144153-14b37585731d h1:ag6trc3Ev+7hzifeWy0M9rHHjrO9nFCYgW8dlKdZ4j4=
github.com/go-vela/types v0.20.2-0.20230822144153-14b37585731d/go.mod h1:AXO4oQSygOBQ02fPapsKjQHkx2aQO3zTu7clpvVbXBY=
github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/go-vela/types v0.20.2-0.20230922185343-b83bcddfa60d h1:PoGQfHM1Lq3cCttrQ9s5Cp9bHc1xXNWNYLGArPvHqRo=
github.com/go-vela/types v0.20.2-0.20230922185343-b83bcddfa60d/go.mod h1:fVmUP4y7Cw8cG6CBWTdjIdgXNNrpVo25yoE9NmNBdOg=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
Expand Down Expand Up @@ -235,6 +238,7 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3veNs=
github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
Expand Down Expand Up @@ -289,6 +293,7 @@ github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8t
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
Expand Down Expand Up @@ -350,6 +355,7 @@ github.com/redis/go-redis/v9 v9.1.0 h1:137FnGdk+EQdCbye1FW+qOEcY5S+SpY9T0Niuqvtf
github.com/redis/go-redis/v9 v9.1.0/go.mod h1:urWj3He21Dj5k4TK1y59xH8Uj6ATueP8AH1cY3lZl4c=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
Expand Down Expand Up @@ -732,6 +738,7 @@ google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI=
gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
Expand Down Expand Up @@ -767,3 +774,4 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
5 changes: 4 additions & 1 deletion mock/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func FakeHandler() http.Handler {
e.PUT("/api/v1/admin/service", updateService)
e.PUT("/api/v1/admin/step", updateStep)
e.PUT("/api/v1/admin/user", updateUser)
e.POST("/api/v1/admin/workers/:worker/register-token", registerToken)
e.POST("/api/v1/admin/workers/:worker/register", registerToken)
e.PUT("api/v1/admin/clean", cleanResoures)

// mock endpoints for build calls
Expand Down Expand Up @@ -137,5 +137,8 @@ func FakeHandler() http.Handler {
e.POST("/authenticate/token", getAuthenticateFromToken)
e.GET("/validate-token", validateToken)

// mock endpoint for queue credentials
e.GET("/api/v1/queue/info", getQueueCreds)

return e
}
30 changes: 30 additions & 0 deletions mock/server/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ const (
RegisterTokenResp = `{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ3b3JrZXIiLCJpYXQiOjE1MTYyMzkwMjIsInRva2VuX3R5cGUiOiJXb3JrZXJSZWdpc3RlciJ9.gEzKaZB-sDd_gFCVF5uGo2mcf3iy9CrXDTLPZ6PTsTc"
}`

// QueueInfoResp represents a JSON return for an admin requesting a queue registration info.
//
//not actual credentials.
QueueInfoResp = `{
"queue_public_key": "DXeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ98zmko=",
"queue_address": "redis://redis:6000"
}`
)

// getWorkers returns mock JSON for a http GET.
Expand Down Expand Up @@ -199,3 +207,25 @@ func registerToken(c *gin.Context) {

c.JSON(http.StatusCreated, body)
}

// getQueueCreds returns mock JSON for a http GET.
//
// Pass "" to Authorization header to test receiving a http 401 response.
func getQueueCreds(c *gin.Context) {
token := c.Request.Header.Get("Authorization")
// verify token if empty
if token == "" {
msg := "unable get queue credentials; invalid registration token"

c.AbortWithStatusJSON(http.StatusUnauthorized, types.Error{Message: &msg})

return
}

data := []byte(QueueInfoResp)

var body library.QueueInfo
_ = json.Unmarshal(data, &body)

c.JSON(http.StatusCreated, body)
}
10 changes: 6 additions & 4 deletions queue/queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ func TestQueue_New(t *testing.T) {
{
failure: false,
setup: &Setup{
Driver: "redis",
Address: fmt.Sprintf("redis://%s", _redis.Addr()),
Routes: []string{"foo"},
Cluster: false,
Driver: "redis",
Address: fmt.Sprintf("redis://%s", _redis.Addr()),
Routes: []string{"foo"},
Cluster: false,
PrivateKey: "bOiFT7Y9e0jpOqaapTa3NzUkAve3VdRvyowgsY/vtlcK5L4RADOh9uTe1UVLdu3l/a0hvhiIkkLidUwVBhASWA==",
PublicKey: "CuS+EQAzofbk3tVFS3bt5f2tIb4YiJJC4nVMFQYQElg=",
},
},
{
Expand Down
10 changes: 9 additions & 1 deletion queue/redis/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ func WithPrivateKey(key string) ClientOpt {
c.config.PrivateKey = new([64]byte)
copy(c.config.PrivateKey[:], decoded)

if len(*c.config.PrivateKey) != 64 {
return errors.New("no valid queue signing private key provided")
}

if c.config.PrivateKey == nil {
return errors.New("unable to copy decoded queue signing private key, copied key is nil")
}
Expand Down Expand Up @@ -132,8 +136,12 @@ func WithPublicKey(key string) ClientOpt {
c.config.PublicKey = new([32]byte)
copy(c.config.PublicKey[:], decoded)

if len(*c.config.PublicKey) != 32 {
return errors.New("no valid queue public key provided")
}

if c.config.PublicKey == nil {
return errors.New("unable to copy decoded queue signing public key, copied key is nil")
return errors.New("unable to copy decoded queue public key, copied key is nil")
}

if len(c.config.PublicKey) == 0 {
Expand Down
5 changes: 0 additions & 5 deletions queue/redis/pop.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ func (c *client) Pop(ctx context.Context, routes []string) (*types.Item, error)
return nil, err
}

// this should already be validated on startup
if c.config.PublicKey == nil || len(*c.config.PublicKey) != 32 {
return nil, errors.New("no valid signing public key provided")
}

// extract signed item from pop results
signed := []byte(result[1])

Expand Down
5 changes: 0 additions & 5 deletions queue/redis/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ func (c *client) Push(ctx context.Context, channel string, item []byte) error {

var out []byte

// this should already be validated on startup
if c.config.PrivateKey == nil || len(*c.config.PrivateKey) != 64 {
return errors.New("no valid signing private key provided")
}

c.Logger.Tracef("signing item for queue %s", channel)

// sign the item using the private key generated using sign
Expand Down
4 changes: 4 additions & 0 deletions queue/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ func (s *Setup) Validate() error {
return fmt.Errorf("no queue routes provided")
}

if len(s.PublicKey) == 0 {
return fmt.Errorf("no queue public key was provided")
}

// setup is valid
return nil
}
27 changes: 15 additions & 12 deletions queue/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ func TestQueue_Setup_Redis(t *testing.T) {
defer _redis.Close()

_setup := &Setup{
Driver: "redis",
Address: fmt.Sprintf("redis://%s", _redis.Addr()),
Routes: []string{"foo"},
Cluster: false,
Driver: "redis",
Address: fmt.Sprintf("redis://%s", _redis.Addr()),
Routes: []string{"foo"},
Cluster: false,
PublicKey: "CuS+EQAzofbk3tVFS3bt5f2tIb4YiJJC4nVMFQYQElg=",
}

_, err = _setup.Redis()
Expand Down Expand Up @@ -63,19 +64,21 @@ func TestQueue_Setup_Validate(t *testing.T) {
{
failure: false,
setup: &Setup{
Driver: "redis",
Address: "redis://redis.example.com",
Routes: []string{"foo"},
Cluster: false,
Driver: "redis",
Address: "redis://redis.example.com",
Routes: []string{"foo"},
Cluster: false,
PublicKey: "CuS+EQAzofbk3tVFS3bt5f2tIb4YiJJC4nVMFQYQElg=",
},
},
{
failure: false,
setup: &Setup{
Driver: "kafka",
Address: "kafka://kafka.example.com",
Routes: []string{"foo"},
Cluster: false,
Driver: "kafka",
Address: "kafka://kafka.example.com",
Routes: []string{"foo"},
Cluster: false,
PublicKey: "CuS+EQAzofbk3tVFS3bt5f2tIb4YiJJC4nVMFQYQElg=",
},
},
{
Expand Down
5 changes: 3 additions & 2 deletions router/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import (
// PUT /api/v1/admin/secret
// PUT /api/v1/admin/service
// PUT /api/v1/admin/step
// PUT /api/v1/admin/user.
// PUT /api/v1/admin/user
// POST /api/v1/admin/workers/:worker/register.
func AdminHandlers(base *gin.RouterGroup) {
// Admin endpoints
_admin := base.Group("/admin", perm.MustPlatformAdmin())
Expand Down Expand Up @@ -59,6 +60,6 @@ func AdminHandlers(base *gin.RouterGroup) {
_admin.PUT("/user", admin.UpdateUser)

// Admin worker endpoint
_admin.POST("/workers/:worker/register-token", admin.RegisterToken)
_admin.POST("/workers/:worker/register", admin.RegisterToken)
} // end of admin endpoints
}
Loading

0 comments on commit 9d9772d

Please sign in to comment.