update
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user