Separate client and server codes. Keep everything in one git repo for simplicity
[vchess.git] / client / src / utils / ajax.js
similarity index 95%
rename from public/javascripts/utils/ajax.js
rename to client/src/utils/ajax.js
index dc21705..065f382 100644 (file)
@@ -9,7 +9,7 @@ function toQueryString(data)
 }
 
 // data, error: optional
-function ajax(url, method, data, success, error)
+export function ajax(url, method, data, success, error)
 {
        let xhr = new XMLHttpRequest();
        if (typeof(data) === "function") //no data