Explorar el Código

Top broker added for summary dashboard now complete.

master
sp hace 4 años
padre
commit
121e4ae10f
Se han modificado 3 ficheros con 28 adiciones y 0 borrados
  1. +12
    -0
      apiV1ChartRecent10Loans.go
  2. +12
    -0
      apiV1ChartTopBroker.go
  3. +4
    -0
      apiv1.go

+ 12
- 0
apiV1ChartRecent10Loans.go Ver fichero

@@ -0,0 +1,12 @@
package main

import (
"biukop.com/sfm/loan"
"net/http"
)

func apiV1ChartRecent10Loans(w http.ResponseWriter, r *http.Request, ss *loan.Session) {
data := loan.Recent10Loans()
//send out
apiV1SendJson(data, w, r, ss)
}

+ 12
- 0
apiV1ChartTopBroker.go Ver fichero

@@ -0,0 +1,12 @@
package main

import (
"biukop.com/sfm/loan"
"net/http"
)

func apiV1ChartTopBroker(w http.ResponseWriter, r *http.Request, ss *loan.Session) {
data := loan.TopBroker()
//send out
apiV1SendJson(data, w, r, ss)
}

+ 4
- 0
apiv1.go Ver fichero

@@ -33,6 +33,8 @@ func setupApiV1Handler() []apiV1HandlerMap {
{"GET", "chart/type-of-loans", apiV1ChartTypeOfLoans},
{"GET", "chart/amount-of-loans", apiV1ChartTypeOfLoans},
{"GET", "chart/past-year-monthly", apiV1ChartPastYearMonthly},
{"GET", "chart/recent-10-loans", apiV1ChartRecent10Loans},
{"GET", "chart/top-broker", apiV1ChartTopBroker},
{"GET", "login", apiV1DumpRequest},
}
} else { //production
@@ -42,6 +44,8 @@ func setupApiV1Handler() []apiV1HandlerMap {
{"GET", "chart/type-of-loans", apiV1ChartTypeOfLoans},
{"GET", "chart/amount-of-loans", apiV1ChartTypeOfLoans},
{"GET", "chart/past-year-monthly", apiV1ChartPastYearMonthly},
{"GET", "chart/recent-10-loans", apiV1ChartRecent10Loans},
{"GET", "chart/top-broker", apiV1ChartTopBroker},
{"GET", "login", apiV1EmptyResponse},
}
}

Cargando…
Cancelar
Guardar