Fix variable reference mistake

This commit is contained in:
2026-06-12 16:39:56 +02:00
parent 8cee5b506e
commit d8955251fb
+4 -4
View File
@@ -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) {