package server import ( "encoding/json" "net/http" ) // handleSessionCheck returns null (session is valid if middleware passed). func (s *Server) handleSessionCheck(w http.ResponseWriter, r *http.Request) { s.writeJSONRPC(w, nil, nil, nil) } // handleSessionModules returns installed module names. func (s *Server) handleSessionModules(w http.ResponseWriter, r *http.Request) { s.writeJSONRPC(w, nil, []string{ "base", "web", "account", "sale", "stock", "purchase", "hr", "project", "crm", "fleet", "l10n_de", "product", }, nil) } // handleManifest returns a minimal PWA manifest. func (s *Server) handleManifest(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/manifest+json") json.NewEncoder(w).Encode(map[string]interface{}{ "name": "Odoo", "short_name": "Odoo", "start_url": "/web", "display": "standalone", "background_color": "#71639e", "theme_color": "#71639e", "icons": []map[string]string{ {"src": "/web/static/img/odoo-icon-192x192.png", "sizes": "192x192", "type": "image/png"}, }, }) } // handleBootstrapTranslations returns empty translations for initial boot. func (s *Server) handleBootstrapTranslations(w http.ResponseWriter, r *http.Request) { s.writeJSONRPC(w, nil, map[string]interface{}{ "lang": "en_US", "hash": "empty", "modules": map[string]interface{}{}, "multi_lang": false, }, nil) }