浏览代码

past year monthly value chart waterflow is ready.

master
sp 5 年前
父节点
当前提交
0131427b9e
共有 3 个文件被更改,包括 14 次插入0 次删除
  1. +12
    -0
      apiV1ChartPastYearMonthly.go
  2. +0
    -0
      apiV1ChartTypeOfLoans.go
  3. +2
    -0
      apiv1.go

+ 12
- 0
apiV1ChartPastYearMonthly.go 查看文件

package main

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

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

chartTypeOfLoans.go → apiV1ChartTypeOfLoans.go 查看文件


+ 2
- 0
apiv1.go 查看文件

{"*", "logout", apiV1Logout}, {"*", "logout", apiV1Logout},
{"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", "login", apiV1DumpRequest}, {"GET", "login", apiV1DumpRequest},
} }
} else { //production } else { //production
{"*", "logout", apiV1Logout}, {"*", "logout", apiV1Logout},
{"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", "login", apiV1EmptyResponse}, {"GET", "login", apiV1EmptyResponse},
} }
} }

正在加载...
取消
保存