From 27864aa9fc431a42f4e504f5a1723b6b8751ab77 Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 17 Jun 2019 19:50:09 +1000 Subject: [PATCH] fix some shit --- client/src/socket.jsx | 2 +- client/src/utils.jsx | 2 +- server/src/net.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/socket.jsx b/client/src/socket.jsx index 2d48179d..18e2f1c3 100644 --- a/client/src/socket.jsx +++ b/client/src/socket.jsx @@ -1,7 +1,7 @@ const toast = require('izitoast'); const cbor = require('borc'); -const SOCKET_URL = process.env.NODE_ENV === 'production' ? 'wss://mnml.gg/ws' : 'ws://localhost:40000/api/ws'; +const SOCKET_URL = process.env.NODE_ENV === 'production' ? 'wss://mnml.gg/api/ws' : 'ws://localhost:40000/api/ws'; function errorToast(err) { console.error(err); diff --git a/client/src/utils.jsx b/client/src/utils.jsx index 5c328a34..c10406b6 100644 --- a/client/src/utils.jsx +++ b/client/src/utils.jsx @@ -345,7 +345,7 @@ const TARGET_COLOURS = { BROWN: '#583108', }; -const SERVER = process.env.NODE_ENV === 'production' ? '/' : 'http://localhost:40000'; +const SERVER = process.env.NODE_ENV === 'production' ? '/api/' : 'http://localhost:40000/api'; function postData(url = '/', data = {}) { // Default options are marked with * return fetch(`${SERVER}${url}`, { diff --git a/server/src/net.rs b/server/src/net.rs index afebdf91..eafdd420 100644 --- a/server/src/net.rs +++ b/server/src/net.rs @@ -165,7 +165,7 @@ pub fn start() { .service(web::resource("/api/payments/stripe").route(web::post().to(stripe_payment))) .service(web::resource("/api/payments/crypto").route(web::post().to(stripe_payment))) - .service(web::resource("/api/ws/").route(web::get().to(connect)))) + .service(web::resource("/api/ws").route(web::get().to(connect)))) .bind("127.0.0.1:40000").expect("could not bind to port") .run().expect("could not start http server"); }