Merge branch 'master' into 15577-ownership-transfer
[arvados.git] / lib / controller / router / router.go
index 9c2c1f3a11f6dac93eeabeb6478bea8653b9aedb..d3bdce527211e1b26245a820dcbc9cd174f3dc62 100644 (file)
@@ -40,6 +40,20 @@ func (rtr *router) addRoutes() {
                defaultOpts func() interface{}
                exec        routableFunc
        }{
+               {
+                       arvados.EndpointConfigGet,
+                       func() interface{} { return &struct{}{} },
+                       func(ctx context.Context, opts interface{}) (interface{}, error) {
+                               return rtr.fed.ConfigGet(ctx)
+                       },
+               },
+               {
+                       arvados.EndpointLogin,
+                       func() interface{} { return &arvados.LoginOptions{} },
+                       func(ctx context.Context, opts interface{}) (interface{}, error) {
+                               return rtr.fed.Login(ctx, *opts.(*arvados.LoginOptions))
+                       },
+               },
                {
                        arvados.EndpointCollectionCreate,
                        func() interface{} { return &arvados.CreateOptions{} },
@@ -256,7 +270,7 @@ func (rtr *router) addRoute(endpoint arvados.APIEndpoint, defaultOpts func() int
                        rtr.sendError(w, err)
                        return
                }
-               rtr.sendResponse(w, resp, respOpts)
+               rtr.sendResponse(w, req, resp, respOpts)
        })
 }