|
@@ -1,6 +1,11 @@
|
|
|
import axios from "axios";
|
|
import axios from "axios";
|
|
|
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
|
|
|
|
|
|
|
|
+const BaseURL = {
|
|
|
|
|
+ pinnacle: "https://api.pinnacle888.com",
|
|
|
|
|
+ pstery: "http://127.0.0.1:9055",
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
export const pinnacleRequest = async (options) => {
|
|
export const pinnacleRequest = async (options) => {
|
|
|
const {
|
|
const {
|
|
|
endpoint,
|
|
endpoint,
|
|
@@ -20,7 +25,7 @@ export const pinnacleRequest = async (options) => {
|
|
|
const authHeader = `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`;
|
|
const authHeader = `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`;
|
|
|
|
|
|
|
|
const axiosConfig = {
|
|
const axiosConfig = {
|
|
|
- baseURL: "https://api.pinnacle888.com",
|
|
|
|
|
|
|
+ baseURL: BaseURL.pinnacle,
|
|
|
url: endpoint,
|
|
url: endpoint,
|
|
|
method,
|
|
method,
|
|
|
headers: {
|
|
headers: {
|
|
@@ -44,7 +49,7 @@ export const pinnacleRequest = async (options) => {
|
|
|
|
|
|
|
|
export const getPsteryRelations = async (mk=-1) => {
|
|
export const getPsteryRelations = async (mk=-1) => {
|
|
|
const axiosConfig = {
|
|
const axiosConfig = {
|
|
|
- baseURL: 'http://127.0.0.1:9055',
|
|
|
|
|
|
|
+ baseURL: BaseURL.pstery,
|
|
|
url: '/api/pstery/get_games_relation',
|
|
url: '/api/pstery/get_games_relation',
|
|
|
method: 'GET',
|
|
method: 'GET',
|
|
|
params: {
|
|
params: {
|
|
@@ -58,7 +63,7 @@ export const getPsteryRelations = async (mk=-1) => {
|
|
|
|
|
|
|
|
export const updateBaseEvents = async (data) => {
|
|
export const updateBaseEvents = async (data) => {
|
|
|
const axiosConfig = {
|
|
const axiosConfig = {
|
|
|
- baseURL: 'http://127.0.0.1:9055',
|
|
|
|
|
|
|
+ baseURL: BaseURL.pstery,
|
|
|
url: '/api/pstery/update_base_events',
|
|
url: '/api/pstery/update_base_events',
|
|
|
method: 'POST',
|
|
method: 'POST',
|
|
|
headers: {
|
|
headers: {
|
|
@@ -73,7 +78,7 @@ export const updateBaseEvents = async (data) => {
|
|
|
|
|
|
|
|
export const notifyException = async (message) => {
|
|
export const notifyException = async (message) => {
|
|
|
const axiosConfig = {
|
|
const axiosConfig = {
|
|
|
- baseURL: 'http://127.0.0.1:9055',
|
|
|
|
|
|
|
+ baseURL: BaseURL.pstery,
|
|
|
url: '/api/pstery/notify_exception',
|
|
url: '/api/pstery/notify_exception',
|
|
|
method: 'POST',
|
|
method: 'POST',
|
|
|
data: { message },
|
|
data: { message },
|