diff --git a/registry/handlers/app.go b/registry/handlers/app.go index f3eae82d..4a6df3c2 100644 --- a/registry/handlers/app.go +++ b/registry/handlers/app.go @@ -706,7 +706,7 @@ func (app *App) dispatcher(dispatch dispatchFunc) http.Handler { } // assign and decorate the authorized repository with an event bridge. - context.Repository, context.App.repoRemover = notifications.Listen( + context.Repository, context.RepositoryRemover = notifications.Listen( repository, context.App.repoRemover, app.eventBridge(context, r)) diff --git a/registry/handlers/context.go b/registry/handlers/context.go index e5d26768..7a67b604 100644 --- a/registry/handlers/context.go +++ b/registry/handlers/context.go @@ -25,6 +25,9 @@ type Context struct { // should be scoped to a single repository. This field may be nil. Repository distribution.Repository + // RepositoryRemover provides method to delete a repository + RepositoryRemover distribution.RepositoryRemover + // Errors is a collection of errors encountered during the request to be // returned to the client API. If errors are added to the collection, the // handler *must not* start the response via http.ResponseWriter.