Making baseURL neutral

This commit is contained in:
Fabian Stamm 2019-08-07 23:25:57 +02:00
parent 261642779f
commit 03a7f76b43
3 changed files with 2343 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,7 +1,6 @@
.DS_Store
node_modules
public/bundle.*
package-lock.json
yarn.lock
.rpt2_cache
build/

2341
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,8 @@
import { getCookie } from "./cookie";
// const baseURL = "https://auth.stamm.me";
const baseURL = "http://localhost:3000";
// const baseURL = "http://localhost:3000";
const baseURL = "";
export default async function request(endpoint: string, parameters: { [key: string]: string } = {}, method: "GET" | "POST" | "DELETE" | "PUT" = "GET", body?: any, authInParam = false) {
let pairs = [];