multinode/console: server reorder payouts API routes

Change-Id: Ia42bb3faae8a8782d841e5cba186dc73478581ac
This commit is contained in:
Yaroslav Vorobiov 2021-05-26 13:16:24 +03:00
parent 23f9beb635
commit 64e4225721

View File

@ -75,18 +75,18 @@ func NewServer(log *zap.Logger, config Config, nodes *nodes.Service, payouts *pa
payoutsController := controllers.NewPayouts(server.log, server.payouts)
payoutsRouter := apiRouter.PathPrefix("/payouts").Subrouter()
payoutsRouter.HandleFunc("/satellite/{id}/summary/{period}", payoutsController.SatellitePeriodSummary).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/satellite/{id}/summary", payoutsController.SatelliteSummary).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/summary/{period}", payoutsController.PeriodSummary).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/summary", payoutsController.Summary).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/total-earned", payoutsController.GetAllNodesTotalEarned).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/expectations/{nodeID}", payoutsController.NodeExpectations).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/summaries", payoutsController.Summary).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/summaries/{period}", payoutsController.PeriodSummary).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/expectations", payoutsController.Expectations).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/satellite/{id}/paystub/{period}/{nodeID}", payoutsController.SatellitePaystubPeriod).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/satellite/{id}/paystub/{nodeID}", payoutsController.SatellitePaystub).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/paystub/{period}/{nodeID}", payoutsController.PaystubPeriod).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/paystub/{nodeID}", payoutsController.Paystub).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/expectations/{nodeID}", payoutsController.NodeExpectations).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/paystubs/{nodeID}", payoutsController.Paystub).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/paystubs/{period}/{nodeID}", payoutsController.PaystubPeriod).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/total-earned", payoutsController.GetAllNodesTotalEarned).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/held-amounts/{nodeID}", payoutsController.HeldAmountSummary).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/satellites/{id}/summaries", payoutsController.SatelliteSummary).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/satellites/{id}/summaries/{period}", payoutsController.SatellitePeriodSummary).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/satellites/{id}/paystubs/{nodeID}", payoutsController.SatellitePaystub).Methods(http.MethodGet)
payoutsRouter.HandleFunc("/satellites/{id}/paystubs/{period}/{nodeID}", payoutsController.SatellitePaystubPeriod).Methods(http.MethodGet)
if server.config.StaticDir != "" {
router.PathPrefix("/static/").Handler(http.StripPrefix("/static", fs))