Fix variable reference mistake
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user