🔧 Changed scrape source to TFAW
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user