package api import ( "database/sql" "net/http" ) func NewRouter(metaDB *sql.DB, marketingDB *sql.DB) http.Handler { mux := http.NewServeMux() mux.Handle("/api/templates", TemplatesHandler(metaDB, marketingDB)) mux.Handle("/api/templates/", TemplatesHandler(metaDB, marketingDB)) mux.Handle("/api/exports", ExportsHandler(metaDB, marketingDB)) mux.Handle("/api/exports/", ExportsHandler(metaDB, marketingDB)) mux.Handle("/", http.FileServer(http.Dir("web"))) return mux }