diff --git a/registry/handlers/app.go b/registry/handlers/app.go index 4cc47371a..35b5504f0 100644 --- a/registry/handlers/app.go +++ b/registry/handlers/app.go @@ -702,7 +702,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 e5d267688..7a67b6046 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.