refactor db accessor

This commit is contained in:
2024-08-26 13:10:34 -05:00
parent 3bf2b4d71f
commit e6947e714d
19 changed files with 516 additions and 302 deletions

View File

@@ -9,7 +9,8 @@ import (
)
func main() {
nkodeApi := nkode.NewNKodeInMemory()
db := nkode.NewInMemoryDb()
nkodeApi := nkode.NewNKodeAPI(&db)
handler := api.NKodeHandler{Api: &nkodeApi}
mux := http.NewServeMux()
mux.Handle(api.CreateNewCustomer, &handler)