(mux *http.ServeMux, usersStore users.Store, nodesStore nodes.Store, inboundStore inbounds.InboundStore, outboundStore outbounds.Store, dial jobs.NodeDialer, applyOpts jobs.ApplyOptions, geoDB *geoip.DB, sesStore PortalSessionStore)
| 129 | } |
| 130 | |
| 131 | func RegisterUsersAPI(mux *http.ServeMux, usersStore users.Store, nodesStore nodes.Store, inboundStore inbounds.InboundStore, outboundStore outbounds.Store, dial jobs.NodeDialer, applyOpts jobs.ApplyOptions, geoDB *geoip.DB, sesStore PortalSessionStore) { |
| 132 | base := New(nodesStore) |
| 133 | base.inboundStore = inboundStore |
| 134 | base.outboundStore = outboundStore |
| 135 | a := newUserAPI(usersStore, nodesStore, inboundStore, outboundStore, base, dial, applyOpts, geoDB) |
| 136 | a.sessions = sesStore |
| 137 | a.Register(mux) |
| 138 | } |
| 139 | |
| 140 | func (a *API) Register(mux *http.ServeMux) { |
| 141 | mux.HandleFunc("/v1/nodes", a.handleNodes) |
no test coverage detected