🔧 Changed scrape source to TFAW

This commit is contained in:
2025-01-17 09:21:19 -05:00
parent 7749f2db49
commit ab08613689
3 changed files with 44 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
"use strict";
import { Service, ServiceBroker, Context } from "moleculer";
import axios from "axios";
import { Context, Service, ServiceBroker } from "moleculer";
const METRON_BASE_URL = "https://metron.cloud/api/";
@@ -24,7 +24,7 @@ export default class MetronService extends Service {
};
}>
) => {
console.log(ctx.params);
console.log(ctx.params);
const results = await axios({
method: "GET",
url: `https://metron.cloud/api/${ctx.params.resource}`,
@@ -32,7 +32,14 @@ export default class MetronService extends Service {
name: ctx.params.query.name,
page: ctx.params.query.page,
},
headers: {
"Authorization": "Basic ZnJpc2hpOlRpdHVAMTU4OA=="
},
auth: {
"username": "frishi",
"password": "Titu@1588"
}
});
return results.data;
},