diff --git a/backend/server.js b/backend/server.js index de209f9..9861921 100644 --- a/backend/server.js +++ b/backend/server.js @@ -955,7 +955,7 @@ app.get('/api/auto-urls', async (req, res) => { const data = await s3.getObject(params).promise(); const fileContent = data.Body.toString('utf-8'); const urls = fileContent.split('\n').filter(line => line).map(line => { - const parts = line.trim().split(/\s*\|\s*/); + const parts = line.trim().split(/\s+/); const url = parts[0] || ''; const community = parts[1] || ''; return { url, community }; @@ -974,7 +974,7 @@ app.get('/api/auto-urls', async (req, res) => { // Update auto URLs in S3 app.post('/api/auto-urls', async (req, res) => { const { urls } = req.body; - const fileContent = urls.map(u => `${u.url} | ${u.community}`).join('\n'); + const fileContent = urls.map(u => `${u.url} ${u.community}`).join('\n'); const params = { Bucket: BUCKET_NAME, @@ -1009,7 +1009,7 @@ app.post('/api/auto-urls/process', async (req, res) => { const urlsData = await s3.getObject(urlsParams).promise(); const urlsContent = urlsData.Body.toString('utf-8'); urls = urlsContent.split('\n').filter(line => line).map(line => { - const parts = line.trim().split(/\s*\|\s*/); + const parts = line.trim().split(/\s+/); return { url: parts[0] || '', community: parts[1] || '' }; }); } catch (error) { diff --git a/frontend/src/AutoUrlManager.jsx b/frontend/src/AutoUrlManager.jsx index 9190a43..993041a 100644 --- a/frontend/src/AutoUrlManager.jsx +++ b/frontend/src/AutoUrlManager.jsx @@ -261,8 +261,7 @@ function AutoUrlManager() {

Формат файла:

Файл сохраняется в формате:

-{`https://test.com/ips.txt | 555
-https://example.com/blacklist.txt | 666`}
+{`https://test.com/ips.txt 555\nhttps://example.com/blacklist.txt 666`}