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

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

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

{"GET", "chart/type-of-loans", apiV1ChartTypeOfLoans}, {"GET", "chart/type-of-loans", apiV1ChartTypeOfLoans},
{"GET", "chart/amount-of-loans", apiV1ChartTypeOfLoans}, {"GET", "chart/amount-of-loans", apiV1ChartTypeOfLoans},
{"GET", "chart/past-year-monthly", apiV1ChartPastYearMonthly}, {"GET", "chart/past-year-monthly", apiV1ChartPastYearMonthly},
{"GET", "chart/recent-10-loans", apiV1ChartRecent10Loans},
{"GET", "chart/top-broker", apiV1ChartTopBroker},
{"GET", "login", apiV1DumpRequest}, {"GET", "login", apiV1DumpRequest},
} }
} else { //production } else { //production
{"GET", "chart/type-of-loans", apiV1ChartTypeOfLoans}, {"GET", "chart/type-of-loans", apiV1ChartTypeOfLoans},
{"GET", "chart/amount-of-loans", apiV1ChartTypeOfLoans}, {"GET", "chart/amount-of-loans", apiV1ChartTypeOfLoans},
{"GET", "chart/past-year-monthly", apiV1ChartPastYearMonthly}, {"GET", "chart/past-year-monthly", apiV1ChartPastYearMonthly},
{"GET", "chart/recent-10-loans", apiV1ChartRecent10Loans},
{"GET", "chart/top-broker", apiV1ChartTopBroker},
{"GET", "login", apiV1EmptyResponse}, {"GET", "login", apiV1EmptyResponse},
} }
} }

Cargando…
Cancelar
Guardar