Add podcast redirects and route through first-party links
This commit is contained in:
@@ -34,6 +34,7 @@ const CHATBOT_FILE = path.join(DATA_DIR, 'chatbot-content.json')
|
||||
const BACKUP_DIR = path.join(DATA_DIR, 'backups')
|
||||
const DIST_DIR = path.join(__dirname, 'dist')
|
||||
const INDEX_FILE = path.join(DIST_DIR, 'index.html')
|
||||
const PODCAST_ART_FILE = path.join(__dirname, 'public', 'images', 'podcast-art.jpeg')
|
||||
const TITUS_STUDY_FILE = process.env.TITUS_STUDY_FILE
|
||||
? path.resolve(__dirname, process.env.TITUS_STUDY_FILE)
|
||||
: path.join(__dirname, 'A_Study_of_Titus.pdf')
|
||||
@@ -1468,6 +1469,26 @@ app.get('/api/episodes', async (_req, res) => {
|
||||
}
|
||||
})
|
||||
|
||||
app.get('/spotify', (_req, res) => {
|
||||
res.redirect(301, 'https://open.spotify.com/show/0Gq1TzoJOdReSZ1gYQi8Xl')
|
||||
})
|
||||
|
||||
app.get('/apple', (_req, res) => {
|
||||
res.redirect(301, 'https://podcasts.apple.com/search?term=Verse+by+Verse+with+Nate')
|
||||
})
|
||||
|
||||
app.get('/amazon', (_req, res) => {
|
||||
res.redirect(301, 'https://music.amazon.com/podcasts/202322bf-db86-4e7d-9a6b-4db7cbccbccf/verse-by-verse-with-nate')
|
||||
})
|
||||
|
||||
app.get('/images/podcast-art.jpeg', (_req, res) => {
|
||||
res.sendFile(PODCAST_ART_FILE, err => {
|
||||
if (err) {
|
||||
res.redirect(301, 'https://necloud.us/images/podcast-art.jpeg')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
app.use(express.static(DIST_DIR))
|
||||
|
||||
app.use(async (_req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user