diff --git a/engines/gitea-searchengine/index.js b/engines/gitea-searchengine/index.js index 895fee8..39bc261 100644 --- a/engines/gitea-searchengine/index.js +++ b/engines/gitea-searchengine/index.js @@ -29,16 +29,16 @@ export default class GiteaEngine { context ) { try { - const doFetch = context?.fetch ?? fetch + const doFetch = context?.fetch ?? fetch; - var headers = {} + var headers = {}; if(this.giteaToken.length > 0){ - headers = { "Authorization": `token ${this.giteaToken}` } + headers = { "Authorization": `token ${this.giteaToken}` }; } const response = await doFetch(`${this.giteaSearchUrl}?q=${encodeURIComponent(query)}&page=${encodeURIComponent(page)}`, {headers: headers}) - context?.sentinel?.(response, name) + context?.sentinel?.(response, this.name) const response_json = await response.json() if (response_json.ok != true) {