Anukul Sangwan 4 gadi atpakaļ
vecāks
revīzija
c85a681ed3
2 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 2 2
      api/server/authz/invite.go
  2. 1 1
      api/server/router/invite.go

+ 2 - 2
api/server/authz/invite.go

@@ -23,7 +23,7 @@ func NewInviteScopedFactory(
 }
 
 func (p *InviteScopedFactory) Middleware(next http.Handler) http.Handler {
-	return &RegistryScopedMiddleware{next, p.config}
+	return &InviteScopedMiddleware{next, p.config}
 }
 
 type InviteScopedMiddleware struct {
@@ -35,7 +35,7 @@ func (p *InviteScopedMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Reques
 	// read the project to check scopes
 	proj, _ := r.Context().Value(types.ProjectScope).(*models.Project)
 
-	// get the registry id from the URL param context
+	// get the invite id from the URL param context
 	reqScopes, _ := r.Context().Value(types.RequestScopeCtxKey).(map[types.PermissionScope]*types.RequestAction)
 	inviteID := reqScopes[types.InviteScope].Resource.UInt
 

+ 1 - 1
api/server/router/invite.go

@@ -52,7 +52,7 @@ func getInviteRoutes(
 
 	routes := make([]*Route, 0)
 
-	// GET /api/projects/{project_id}/invites/{invite_id} -> registry.NewInviteGetHandler
+	// GET /api/projects/{project_id}/invites/{invite_id} -> invite.NewInviteGetHandler
 	getEndpoint := factory.NewAPIEndpoint(
 		&types.APIRequestMetadata{
 			Verb:   types.APIVerbGet,