minor changes to invidious endpoint format

This commit is contained in:
Emily 2021-10-15 22:29:12 +11:00
parent 55c546aa6a
commit ddb81ed114
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ const config = {
// Configurable API endpoints
endpoints: {
invidious: 'https://invidio.us/api/'
invidious: ''
},
// Default per-server settings

View file

@ -45,9 +45,9 @@ exports.getVideoByQuery = async function (client, query, message) {
try {
const id = await ytdl.getURLVideoID(query)
res = await fetch(`${client.config.endpoints.invidious}v1/videos/${id}`)
res = await fetch(`${client.config.endpoints.invidious}/api/v1/videos/${id}`)
} catch (err) {
res = await fetch(`${client.config.endpoints.invidious}v1/search?q=${encodeURIComponent(query)}`)
res = await fetch(`${client.config.endpoints.invidious}/api/v1/search?q=${encodeURIComponent(query)}`)
}
const parsed = await res.json().catch(function (e) {