12345678910111213141516 |
- const express = require('express')
- const router = express.Router()
- const email = require('./email')
- router.post('/', async (req, res) => {
- let useremail = req.body.useremail
- let usermessage = req.body.usermessage
- let data = await email(useremail, usermessage)
- if(data != 'err' && data == 'success') {
- res.status(200).send('success')
- }else {
- res.status(201).send('服务器出错了')
- }
- })
- module.exports = router
|