refatoração de tipagem go
This commit is contained in:
parent
6f78511946
commit
0c41ed4279
12 changed files with 175 additions and 117 deletions
|
|
@ -131,6 +131,12 @@ func main() {
|
|||
http.ServeFile(w, r, "web/static/teste.html")
|
||||
})
|
||||
|
||||
// Conveniência: favicon.
|
||||
// O arquivo fica em web/static/favicon.ico.
|
||||
r.Get("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.ServeFile(w, r, "web/static/favicon.ico")
|
||||
})
|
||||
|
||||
// Rotas NPS.
|
||||
h := elinps.NewHandlers(pool)
|
||||
r.Route("/api/e-li.nps", func(r chi.Router) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
"syscall/js"
|
||||
|
||||
"e-li.nps/internal/contratos"
|
||||
)
|
||||
|
||||
// IMPORTANTE (.agent): o backend Go continua sendo a autoridade das regras.
|
||||
|
|
@ -14,17 +16,7 @@ import (
|
|||
|
||||
var dataISORe = regexp.MustCompile(`^([0-9]{4})-([0-9]{2})-([0-9]{2})$`)
|
||||
|
||||
type cfgWidget struct {
|
||||
ProdutoNome string
|
||||
InquilinoCodigo string
|
||||
InquilinoNome string
|
||||
UsuarioCodigo string
|
||||
UsuarioNome string
|
||||
UsuarioTelefone string
|
||||
UsuarioEmail string
|
||||
CooldownHours float64
|
||||
DataMinimaAbertura string
|
||||
}
|
||||
type cfgWidget = contratos.ConfigWidget
|
||||
|
||||
func main() {
|
||||
js.Global().Set("__eli_nps_wasm_preflight", js.FuncOf(preflight))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue