mirror of
https://github.com/direct-img/direct-img.link.git
synced 2026-03-17 03:01:01 +00:00
Fix: Update safesearch parameter to valid value
This commit is contained in:
@@ -99,7 +99,8 @@ async function sha256(str) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function braveImageSearch(query, apiKey) {
|
async function braveImageSearch(query, apiKey) {
|
||||||
const searchUrl = `https://api.search.brave.com/res/v1/images/search?q=${encodeURIComponent(query)}&count=5&safesearch=moderate`;
|
// Changed safesearch from 'moderate' to 'off' as per API requirements
|
||||||
|
const searchUrl = `https://api.search.brave.com/res/v1/images/search?q=${encodeURIComponent(query)}&count=5&safesearch=off`;
|
||||||
|
|
||||||
const res = await fetch(searchUrl, {
|
const res = await fetch(searchUrl, {
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
Reference in New Issue
Block a user