v1.6.2/mass message, filters

This commit is contained in:
2020-08-15 18:02:04 -04:00
parent 43dc657582
commit 917d30ce05
9 changed files with 688 additions and 212 deletions
+14 -8
View File
@@ -1,7 +1,7 @@
import firebase from 'firebase/app';
import 'firebase/auth';
import firebase from "firebase/app";
import "firebase/auth";
const API = 'http://localhost:5000/watch-party-crx/us-central1/admin';
const API = "http://localhost:5000/watch-party-crx/us-central1/admin";
const fetcher = async ({ endpoint, method, bodyData }) => {
const idToken = await firebase.auth().currentUser.getIdToken();
@@ -10,15 +10,21 @@ const fetcher = async ({ endpoint, method, bodyData }) => {
method,
headers: {
Authorization: `Token ${idToken}:${firebase.auth().currentUser.uid}`,
'Access-Control-Allow-Origin': '*',
"Access-Control-Allow-Origin": "*",
},
body,
});
};
export const getPartyDashboardData = () => fetcher({ endpoint: 'partyDashboard', method: 'GET' });
export const getServerDashboardData = () => fetcher({ endpoint: 'serverDashboard', method: 'GET' });
export const getPartyDashboardData = () =>
fetcher({ endpoint: "partyDashboard", method: "GET" });
export const getServerDashboardData = () =>
fetcher({ endpoint: "serverDashboard", method: "GET" });
export const postUpdateVersionActive = (bodyData) =>
fetcher({ endpoint: 'updateVersionActive', method: 'POST', bodyData });
fetcher({ endpoint: "updateVersionActive", method: "POST", bodyData });
export const postUpdateVideoSelectors = (bodyData) =>
fetcher({ endpoint: 'updateVideoSelectors', method: 'POST', bodyData });
fetcher({ endpoint: "updateVideoSelectors", method: "POST", bodyData });
export const postUpdateVideoNameSelectors = (bodyData) =>
fetcher({ endpoint: "updateVideoNameSelectors", method: "POST", bodyData });
export const postSendMessage = (bodyData) =>
fetcher({ endpoint: "sendMessage", method: "POST", bodyData });