UNPKG

vpn.email

Version:
34 lines (30 loc) 1.25 kB
/// <reference path="../../../typings/tsd.d.ts" /> import express = require('express'); module.exports = data => { const sock: SocketIO.Socket = data.sock; const app: express.Router = data.app; app.get ( "/config/password", ( req, res ) => { res.render( 'config/password', { title: 'password' }); }) app.get ( "/config/",(req, res) => { res.render('config', { title: 'password|index' }); }) app.post ( "/config/password", ( req, res ) => { const body = req.body; console.log ( body ) /* webConnect.session.vpnServerConnectData.stripePayment = body; webConnect.session.vpnServerConnectData.toServer_command = 'payment' webConnect.imapConnect.saveToVpnViaEmail ( webConnect.session, (err) => { if (err) return console.log ('saveToVpnViaEmail error==>', err.message) console.log ('saveToVpnViaEmail payment success!') }) */ res.render( 'config/password', { title: 'password', post: true }); }) app.get ('/config/email', (req, res) => { const body = req.body; res.render( 'config/email', { title: 'email', post: true }); }) }