mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
Remove unsused code.
This commit is contained in:
parent
b403d4105f
commit
3bc706ed4b
6
main.go
6
main.go
@ -25,7 +25,7 @@ func readConfig() models.Config {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
portPtr, err := strconv.Atoi(os.Getenv("WAKAPI_PORT"))
|
port, err := strconv.Atoi(os.Getenv("WAKAPI_PORT"))
|
||||||
dbUser, valid := os.LookupEnv("WAKAPI_DB_USER")
|
dbUser, valid := os.LookupEnv("WAKAPI_DB_USER")
|
||||||
dbPassword, valid := os.LookupEnv("WAKAPI_DB_PASSWORD")
|
dbPassword, valid := os.LookupEnv("WAKAPI_DB_PASSWORD")
|
||||||
dbHost, valid := os.LookupEnv("WAKAPI_DB_HOST")
|
dbHost, valid := os.LookupEnv("WAKAPI_DB_HOST")
|
||||||
@ -39,7 +39,7 @@ func readConfig() models.Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return models.Config{
|
return models.Config{
|
||||||
Port: portPtr,
|
Port: port,
|
||||||
DbHost: dbHost,
|
DbHost: dbHost,
|
||||||
DbUser: dbUser,
|
DbUser: dbUser,
|
||||||
DbPassword: dbPassword,
|
DbPassword: dbPassword,
|
||||||
@ -80,8 +80,6 @@ func main() {
|
|||||||
// Setup Routing
|
// Setup Routing
|
||||||
router := mux.NewRouter()
|
router := mux.NewRouter()
|
||||||
apiRouter := mux.NewRouter().PathPrefix("/api").Subrouter()
|
apiRouter := mux.NewRouter().PathPrefix("/api").Subrouter()
|
||||||
n := negroni.Classic()
|
|
||||||
n.UseHandler(router)
|
|
||||||
|
|
||||||
// API Routes
|
// API Routes
|
||||||
heartbeats := apiRouter.Path("/heartbeat").Subrouter()
|
heartbeats := apiRouter.Path("/heartbeat").Subrouter()
|
||||||
|
Loading…
Reference in New Issue
Block a user