домены для стейджинга и публикации различаются
This commit is contained in:
parent
ba743ff634
commit
c377377ac6
@ -7,6 +7,8 @@ import { QuizSettings } from "@model/settingsData";
|
||||
|
||||
let SESSIONS = "";
|
||||
|
||||
const domain = location.hostname ==="localhost" ? "https://s.hbpn.link" : ""
|
||||
|
||||
export const publicationMakeRequest = ({ url, body }: any) => {
|
||||
return axios(url, {
|
||||
data: body,
|
||||
@ -25,7 +27,7 @@ export async function getData(quizId: string): Promise<{
|
||||
}> {
|
||||
try {
|
||||
const { data, headers } = await axios<GetQuizDataResponse>(
|
||||
`https://s.hbpn.link/answer/settings`,
|
||||
domain + `/answer/settings`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
@ -91,7 +93,7 @@ export function sendAnswer({ questionId, body, qid }: any) {
|
||||
formData.append("qid", qid);
|
||||
|
||||
return publicationMakeRequest({
|
||||
url: `https://s.hbpn.link/answer/answer`,
|
||||
url: domain + `/answer/answer`,
|
||||
body: formData,
|
||||
method: "POST",
|
||||
});
|
||||
@ -114,7 +116,7 @@ export function sendFile({ questionId, body, qid }: any) {
|
||||
formData.append("qid", qid);
|
||||
|
||||
return publicationMakeRequest({
|
||||
url: `https://s.hbpn.link/answer/answer`,
|
||||
url: domain + `/answer/answer`,
|
||||
body: formData,
|
||||
method: "POST",
|
||||
});
|
||||
@ -143,7 +145,7 @@ export function sendFC({ questionId, body, qid }: any) {
|
||||
formData.append("qid", qid);
|
||||
|
||||
return publicationMakeRequest({
|
||||
url: `https://s.hbpn.link/answer/answer`,
|
||||
url: domain + `/answer/answer`,
|
||||
body: formData,
|
||||
method: "POST",
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user