diff options
| author | Adam Soltys <[email protected]> | 2022-06-09 17:27:36 -0400 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-06-09 17:27:53 -0400 |
| commit | c1dff6b22b1e9659943be4ab98b9e0c06e4b11e2 (patch) | |
| tree | 611dedd4d9d81483b23bd2acd9eb53d746b7933d | |
| parent | 3ae8bf7c50f7a1a845de0ae1387b8fec8ae77b4f (diff) | |
| download | coinos-server-c1dff6b22b1e9659943be4ab98b9e0c06e4b11e2.tar.gz coinos-server-c1dff6b22b1e9659943be4ab98b9e0c06e4b11e2.zip | |
capture email endpoint
| -rw-r--r-- | index.js | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -104,6 +104,16 @@ app.use("/admin", adminAuth, adminRouter); require("./startup"); +app.post("/email", async (req, res) => { + try { + let file = persist("data/emails.json"); + file.emails = [...file.emails, req.body]; + res.send({ ok: true }); + } catch (e) { + console.log(e); + } +}); + app.use((err, req, res, next) => { const details = { path: req.path, |
