feat: first pass at filter and game screen + some bug fixes
This commit is contained in:
24
gaseous-server/wwwroot/scripts/main.js
Normal file
24
gaseous-server/wwwroot/scripts/main.js
Normal file
@@ -0,0 +1,24 @@
|
||||
function ajaxCall(endpoint, method, successFunction) {
|
||||
$.ajax({
|
||||
|
||||
// Our sample url to make request
|
||||
url:
|
||||
endpoint,
|
||||
|
||||
// Type of Request
|
||||
type: method,
|
||||
|
||||
// Function to call when to
|
||||
// request is ok
|
||||
success: function (data) {
|
||||
var x = JSON.stringify(data);
|
||||
console.log(x);
|
||||
successFunction(data);
|
||||
},
|
||||
|
||||
// Error handling
|
||||
error: function (error) {
|
||||
console.log(`Error ${error}`);
|
||||
}
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user