Changing data endpoint.

This commit is contained in:
Jorge Bolois 2023-04-15 13:09:48 +02:00
parent 3b4a0e4ffc
commit d44e149026
3 changed files with 11 additions and 8 deletions

2
.env
View File

@ -1,6 +1,6 @@
NAME=Idealista Enhancer
DESCRIPTION=Just some information for idealista.com
VERSION=0.2.2
VERSION=0.2.21
AUTHOR=Midefos
NAMESPACE=https://git.midefos.com/midefos
MATCH=https://www.idealista.com/*

View File

@ -1,14 +1,17 @@
import fs from 'fs';
import browserify from 'browserify';
import dotenv from 'dotenv';
import banner from 'browserify-banner';
dotenv.config();
const STATIC_BANNER = "// ==UserScript==\n" +
"// @name Idealista Enhancer\n" +
"// @description Just some information for idealista.com\n" +
"// @version 0.2.1\n" +
"// @author Midefos\n" +
"// @namespace https://github.com/Midefos\n" +
"// @match https://www.idealista.com/*\n" +
`// @name ${process.env['NAME']}\n` +
`// @description ${process.env['DESCRIPTION']}\n` +
`// @version ${process.env['VERSION']}\n` +
`// @author ${process.env['AUTHOR']}\n` +
`// @namespace ${process.env['NAMESPACE']}\n` +
`// @match ${process.env['MATCH']}\n` +
"// @license MIT\n" +
"// ==/UserScript==\n\n";

View File

@ -10,7 +10,7 @@ export default class Locations {
return storageLocation;
}
const response = await fetch(`https://ih-data.midefos.com/api/town/${name}`);
const response = await fetch(`https://main.midefos.com/api/town/${name}`);
Log.debug(`Requested location '${name}'`);
const data = await response.json();