Hook up registration/login APIs and implement access token generation (#122)

This commit is contained in:
Kegsay 2017-05-30 17:51:40 +01:00 committed by GitHub
parent 65b66a6452
commit 50aacd4f3c
6 changed files with 106 additions and 17 deletions

View file

@ -82,14 +82,14 @@ func Setup(
)
r0mux.Handle("/register", common.MakeAPI("register", func(req *http.Request) util.JSONResponse {
return writers.Register(req, accountDB)
return writers.Register(req, accountDB, deviceDB)
}))
// Stub endpoints required by Riot
r0mux.Handle("/login",
common.MakeAPI("login", func(req *http.Request) util.JSONResponse {
return readers.Login(req, cfg)
return readers.Login(req, accountDB, deviceDB, cfg)
}),
)