finishing up the basic implementation of comments
This commit is contained in:
@@ -68,6 +68,7 @@ func (cs *Service) User(r *http.Request) (string, bool) {
|
||||
func (cs *Service) ServeComments(post string, w http.ResponseWriter, r *http.Request) error {
|
||||
user, allowed := cs.User(r)
|
||||
if !allowed {
|
||||
fmt.Fprintf(w, "<a href='/login'>click here to enter your name and the comments password</a>")
|
||||
w.WriteHeader(401)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user