Create circular references between backend and hubbackend
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Peter Stuifzand 2021-10-31 15:12:23 +01:00
parent 21c226ce56
commit ae55224d11
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -47,10 +47,14 @@ func NewApp(options AppOptions) (*App, error) {
app.backend.AuthEnabled = options.AuthEnabled app.backend.AuthEnabled = options.AuthEnabled
app.backend.baseURL = options.BaseURL app.backend.baseURL = options.BaseURL
// FIXME: circular
app.backend.hubIncomingBackend.pool = options.pool app.backend.hubIncomingBackend.pool = options.pool
app.backend.hubIncomingBackend.baseURL = options.BaseURL app.backend.hubIncomingBackend.baseURL = options.BaseURL
app.backend.hubIncomingBackend.backend = app.backend
app.hubBackend = &hubIncomingBackend{backend: app.backend, baseURL: options.BaseURL, pool: options.pool} app.hubBackend = &hubIncomingBackend{backend: app.backend, baseURL: options.BaseURL, pool: options.pool}
app.backend.hubIncomingBackend = *app.hubBackend
http.Handle("/micropub", &micropubHandler{ http.Handle("/micropub", &micropubHandler{
Backend: app.backend, Backend: app.backend,