mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-17 02:47:51 +01:00
webapi: Move search jobs into API context
This commit is contained in:
@@ -29,6 +29,10 @@ type WebapiInstance struct {
|
||||
Router *mux.Router
|
||||
AllowKeyInParam []string // List of paths that accept the API key as &k= parameter
|
||||
|
||||
// search jobs
|
||||
allJobs map[uuid.UUID]*SearchJob
|
||||
allJobsMutex sync.RWMutex
|
||||
|
||||
// download info
|
||||
downloads map[uuid.UUID]*downloadInfo
|
||||
downloadsMutex sync.RWMutex
|
||||
@@ -56,6 +60,7 @@ func Start(Backend *core.Backend, ListenAddresses []string, UseSSL bool, Certifi
|
||||
backend: Backend,
|
||||
Router: mux.NewRouter(),
|
||||
AllowKeyInParam: []string{"/file/read", "/file/view"},
|
||||
allJobs: make(map[uuid.UUID]*SearchJob),
|
||||
downloads: make(map[uuid.UUID]*downloadInfo),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user