comments and dbg

This commit is contained in:
Umputun
2018-05-24 23:33:12 -05:00
parent 67a50f1b93
commit 38095ec3b5
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -217,6 +217,7 @@ func (s *Rest) createCommentCtrl(w http.ResponseWriter, r *http.Request) {
render.JSON(w, r, &finalComment)
}
// POST /preview, body is a comment
func (s *Rest) previewCommentCtrl(w http.ResponseWriter, r *http.Request) {
comment := store.Comment{}
if err := render.DecodeJSON(http.MaxBytesReader(w, r.Body, hardBodyLimit), &comment); err != nil {
+2 -1
View File
@@ -55,6 +55,7 @@ func (u userData) value(key string) string {
// newProvider makes auth for given provider
func initProvider(p Params, provider Provider) Provider {
log.Printf("[INFO] init auth provider %s", provider.Name)
provider.Params = p
provider.conf = oauth2.Config{
ClientID: provider.Cid,
@@ -64,7 +65,7 @@ func initProvider(p Params, provider Provider) Provider {
Endpoint: provider.Endpoint,
}
log.Printf("[INFO] create %s auth, id=%s, redir: %s, endpoint: %s",
log.Printf("[DEBUG] created %s auth, id=%s, redir=%s, endpoint=%s",
provider.Name, provider.Cid, provider.Endpoint, provider.RedirectURL)
return provider
}