api: add github oauth

Closes https://gitlab.com/commento/commento/issues/20
This commit is contained in:
Adhityaa Chandrasekar
2019-01-30 21:15:16 -05:00
parent 24d76c2fb6
commit 55f24b2de2
8 changed files with 200 additions and 1 deletions

View File

@@ -29,6 +29,9 @@ func apiRouterInit(router *mux.Router) error {
router.HandleFunc("/api/oauth/google/redirect", googleRedirectHandler).Methods("GET")
router.HandleFunc("/api/oauth/google/callback", googleCallbackHandler).Methods("GET")
router.HandleFunc("/api/oauth/github/redirect", githubRedirectHandler).Methods("GET")
router.HandleFunc("/api/oauth/github/callback", githubCallbackHandler).Methods("GET")
router.HandleFunc("/api/comment/new", commentNewHandler).Methods("POST")
router.HandleFunc("/api/comment/list", commentListHandler).Methods("POST")
router.HandleFunc("/api/comment/count", commentCountHandler).Methods("POST")