Explorar el Código

checking available login

master
sp hace 5 años
padre
commit
d539b153ad
Se han modificado 2 ficheros con 13 adiciones y 0 borrados
  1. +11
    -0
      apiV1LoginAvailable.go
  2. +2
    -0
      apiv1.go

+ 11
- 0
apiV1LoginAvailable.go Ver fichero

package main

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

func apiV1LoginAvailable(w http.ResponseWriter, r *http.Request, ss *loan.Session) {
v := r.URL.Path[len(apiV1Prefix+"login-available/"):] //remove prefix
apiV1SendJson(loan.IsLoginAvailable(v), w, r, ss)
}

+ 2
- 0
apiv1.go Ver fichero

{"POST", "user/", apiV1UserPost}, {"POST", "user/", apiV1UserPost},
{"DELETE", "payIn/", apiV1PayInDelete}, {"DELETE", "payIn/", apiV1PayInDelete},
{"GET", "user-reward/", apiV1UserReward}, {"GET", "user-reward/", apiV1UserReward},
{"GET", "login-available/", apiV1LoginAvailable},
{"GET", "login", apiV1DumpRequest}, {"GET", "login", apiV1DumpRequest},
} }
} else { //production } else { //production
{"POST", "user/", apiV1UserPost}, {"POST", "user/", apiV1UserPost},
{"DELETE", "payIn/", apiV1PayInDelete}, {"DELETE", "payIn/", apiV1PayInDelete},
{"GET", "user-reward/", apiV1UserReward}, {"GET", "user-reward/", apiV1UserReward},
{"GET", "login-available/", apiV1LoginAvailable},
{"GET", "login", apiV1EmptyResponse}, {"GET", "login", apiV1EmptyResponse},
} }
} }

Cargando…
Cancelar
Guardar