Переглянути джерело

Top broker added for summary dashboard now complete.

master
sp 4 роки тому
джерело
коміт
121e4ae10f
3 змінених файлів з 28 додано та 0 видалено
  1. +12
    -0
      apiV1ChartRecent10Loans.go
  2. +12
    -0
      apiV1ChartTopBroker.go
  3. +4
    -0
      apiv1.go

+ 12
- 0
apiV1ChartRecent10Loans.go Переглянути файл

@@ -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 Переглянути файл

@@ -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 Переглянути файл

@@ -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},
}
}

Завантаження…
Відмінити
Зберегти