Skip to content

Commit

Permalink
Trivia, fix endpoint url
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudio-Emmolo committed May 28, 2024
1 parent 0fba408 commit 158b30e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/trivia.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ async function lastTrivia() {

async function getTrivia(query = '') {
try {
let url = '/trivia/search'
const prefix = '/nova-vendor/the-3labs-team/nova-trivia-package'
let url = `${prefix}/search`
if (query !== '') {
url = `/trivia/search?query=${query}`
url = `${prefix}/search?query=${query}`
}
const response = await fetch(url, {
method: 'GET',
Expand Down

0 comments on commit 158b30e

Please sign in to comment.