Try to fix indentation problems

This commit is contained in:
Ross Schulman 2017-11-15 21:38:13 -05:00
parent f45e3e4a83
commit febc3126af

View file

@ -84,9 +84,9 @@ func Setup(
func(req *http.Request) util.JSONResponse { func(req *http.Request) util.JSONResponse {
return CreateInvitesFrom3PIDInvites(req, query, cfg, producer, federation, accountDB) return CreateInvitesFrom3PIDInvites(req, query, cfg, producer, federation, accountDB)
}, },
)).Methods("POST", "OPTIONS") )).Methods("POST", "OPTIONS")
v1fedmux.Handle("/exchange_third_party_invite/{roomID}", common.MakeFedAPI( v1fedmux.Handle("/exchange_third_party_invite/{roomID}", common.MakeFedAPI(
"exchange_third_party_invite", cfg.Matrix.ServerName, keys, "exchange_third_party_invite", cfg.Matrix.ServerName, keys,
func(httpReq *http.Request, request *gomatrixserverlib.FederationRequest) util.JSONResponse { func(httpReq *http.Request, request *gomatrixserverlib.FederationRequest) util.JSONResponse {
vars := mux.Vars(httpReq) vars := mux.Vars(httpReq)
@ -94,9 +94,9 @@ v1fedmux.Handle("/exchange_third_party_invite/{roomID}", common.MakeFedAPI(
httpReq, request, vars["roomID"], query, cfg, federation, producer, httpReq, request, vars["roomID"], query, cfg, federation, producer,
) )
}, },
)).Methods("PUT", "OPTIONS") )).Methods("PUT", "OPTIONS")
v1fedmux.Handle("/event/{eventID}", common.MakeFedAPI( v1fedmux.Handle("/event/{eventID}", common.MakeFedAPI(
"federation_get_event", cfg.Matrix.ServerName, keys, "federation_get_event", cfg.Matrix.ServerName, keys,
func(httpReq *http.Request, request *gomatrixserverlib.FederationRequest) util.JSONResponse { func(httpReq *http.Request, request *gomatrixserverlib.FederationRequest) util.JSONResponse {
vars := mux.Vars(httpReq) vars := mux.Vars(httpReq)
@ -104,16 +104,16 @@ v1fedmux.Handle("/event/{eventID}", common.MakeFedAPI(
httpReq.Context(), request, cfg, query, time.Now(), keys, vars["eventID"], httpReq.Context(), request, cfg, query, time.Now(), keys, vars["eventID"],
) )
}, },
)).Methods("GET") )).Methods("GET")
v1fedmux.Handle("/version", common.MakeExternalAPI( v1fedmux.Handle("/version", common.MakeExternalAPI(
"federation_version", "federation_version",
func(httpReq *http.Request) util.JSONResponse { func(httpReq *http.Request) util.JSONResponse {
return Version() return Version()
}, },
)).Methods("GET") )).Methods("GET")
v1fedmux.Handle("/query/directory/?room_alias={alias}", common.MakeFedAPI( v1fedmux.Handle("/query/directory/?room_alias={alias}", common.MakeFedAPI(
"federation_query_room_alias", cfg.Matrix.ServerName, keys, "federation_query_room_alias", cfg.Matrix.ServerName, keys,
func(httpReq *http.Request, request *gomatrixserverlib.FederationRequest) util.JSONResponse { func(httpReq *http.Request, request *gomatrixserverlib.FederationRequest) util.JSONResponse {
vars := mux.Vars(httpReq) vars := mux.Vars(httpReq)
@ -121,5 +121,5 @@ v1fedmux.Handle("/query/directory/?room_alias={alias}", common.MakeFedAPI(
httpReq, federation, request, cfg, aliasAPI, query, vars["alias"], httpReq, federation, request, cfg, aliasAPI, query, vars["alias"],
) )
}, },
)).Methods("Get") )).Methods("Get")
} }