瀏覽代碼

Top broker added for summary dashboard now complete.

master
sp 5 年之前
父節點
當前提交
121e4ae10f
共有 3 個檔案被更改,包括 28 行新增0 行删除
  1. +12
    -0
      apiV1ChartRecent10Loans.go
  2. +12
    -0
      apiV1ChartTopBroker.go
  3. +4
    -0
      apiv1.go

+ 12
- 0
apiV1ChartRecent10Loans.go 查看文件

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 查看文件

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 查看文件

{"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},
} }
} }

Loading…
取消
儲存