master
parent
f6dce5be20
commit
13c64896eb
|
|
@ -19,9 +19,10 @@ import (
|
|||
|
||||
var (
|
||||
Config struct {
|
||||
Port int
|
||||
SessionD string
|
||||
Debug bool
|
||||
Port int
|
||||
SessionD string
|
||||
Debug bool
|
||||
Semaphore sync.Mutex
|
||||
}
|
||||
|
||||
//go:embed template.d/login.html
|
||||
|
|
@ -231,5 +232,18 @@ func handleNotFound(w http.ResponseWriter, r *http.Request) error {
|
|||
}
|
||||
|
||||
func handleAPIChatBot(w http.ResponseWriter, r *http.Request) error {
|
||||
cookie, _ := ParseCookie(r)
|
||||
err := r.ParseForm()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
got := r.PostForm.Get("Message")
|
||||
if len(got) == 0 {
|
||||
return errors.New("empty Message")
|
||||
}
|
||||
|
||||
Config.Semaphore.Lock()
|
||||
defer Config.Semaphore.Unlock()
|
||||
return errors.New("not impl")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue