This commit is contained in:
2025-11-20 12:32:48 +01:00
parent 4415e895e2
commit 2dc6bf44f8
3 changed files with 318 additions and 283 deletions

View File

@@ -70,6 +70,17 @@ app.post('/api/unsubscribe', async (req, res) => {
}
});
app.get('/api/subscribers', async (req, res) => {
try {
const response = await axios.get(`${API_URL}/api/subscribers`);
res.json(response.data);
} catch (error) {
res.status(error.response?.status || 500).json(
error.response?.data || { error: 'Failed to get subscribers' }
);
}
});
app.get('/api/subscribers/:email', async (req, res) => {
try {
const response = await axios.get(`${API_URL}/api/subscribers/${req.params.email}`);