var minisrv_service_file = true; if (!request_headers.query.registering || !request_headers.query.subscriber_name || !request_headers.query.subscriber_username || !request_headers.query.subscriber_contact || !request_headers.query.subscriber_contact_method || !ssid_sessions[socket.ssid].session_store || !ssid_sessions[socket.ssid] || !socket.ssid ) { var errpage = wtvshared.doErrorPage(400); headers = errpage[0]; data = errpage[1]; } else { ssid_sessions[socket.ssid].setSessionData("subscriber_name", request_headers.query.subscriber_name); ssid_sessions[socket.ssid].setSessionData("subscriber_username", request_headers.query.subscriber_username); ssid_sessions[socket.ssid].setSessionData("subscriber_contact", request_headers.query.subscriber_contact); ssid_sessions[socket.ssid].setSessionData("subscriber_contact_method", request_headers.query.subscriber_contact_method); ssid_sessions[socket.ssid].setSessionData("subscriber_userid", '1' + Math.floor(Math.random() * 1000000000000000000)); ssid_sessions[socket.ssid].setSessionData("registered", true); if (!ssid_sessions[socket.ssid].storeSessionData(true)) { var errpage = wtvshared.doErrorPage(400); headers = errpage[0]; data = errpage[1]; } else { headers = `200 OK Content-Type: text/html`; data = ` Finished signing up
You've finished signing up
Thank you for signing up for ${minisrv_config.config.service_name}.

You will now go to your Web Home page. You can always connect to the Internet by choosing Web Home on your TV Home page.


`; } }