Pārlūkot izejas kodu

past year monthly value chart waterflow is ready.

master
sp pirms 4 gadiem
vecāks
revīzija
0131427b9e
3 mainītis faili ar 14 papildinājumiem un 0 dzēšanām
  1. +12
    -0
      apiV1ChartPastYearMonthly.go
  2. +0
    -0
      apiV1ChartTypeOfLoans.go
  3. +2
    -0
      apiv1.go

+ 12
- 0
apiV1ChartPastYearMonthly.go Parādīt failu

@@ -0,0 +1,12 @@
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 Parādīt failu


+ 2
- 0
apiv1.go Parādīt failu

@@ -32,6 +32,7 @@ func setupApiV1Handler() []apiV1HandlerMap {
{"*", "logout", apiV1Logout},
{"GET", "chart/type-of-loans", apiV1ChartTypeOfLoans},
{"GET", "chart/amount-of-loans", apiV1ChartTypeOfLoans},
{"GET", "chart/past-year-monthly", apiV1ChartPastYearMonthly},
{"GET", "login", apiV1DumpRequest},
}
} else { //production
@@ -40,6 +41,7 @@ func setupApiV1Handler() []apiV1HandlerMap {
{"*", "logout", apiV1Logout},
{"GET", "chart/type-of-loans", apiV1ChartTypeOfLoans},
{"GET", "chart/amount-of-loans", apiV1ChartTypeOfLoans},
{"GET", "chart/past-year-monthly", apiV1ChartPastYearMonthly},
{"GET", "login", apiV1EmptyResponse},
}
}

Notiek ielāde…
Atcelt
Saglabāt