https post
This commit is contained in:
parent
79280743d8
commit
19e299b7cf
@ -9,7 +9,6 @@ console.log("Websocket server running on port " + websocket_port);
|
||||
var lookup = [];
|
||||
|
||||
wss.on('connection', function connection(ws) {
|
||||
console.log(ws);
|
||||
lookup[ws.protocol] = ws;
|
||||
});
|
||||
/*{
|
||||
@ -26,7 +25,7 @@ var server = http.createServer(function (request, response) {
|
||||
request.on('data', function (chunk) {
|
||||
body += chunk;
|
||||
});
|
||||
|
||||
try {
|
||||
request.on('end', function () {
|
||||
body = JSON.parse(body);
|
||||
console.log(body);
|
||||
@ -40,6 +39,7 @@ var server = http.createServer(function (request, response) {
|
||||
};
|
||||
lookup[body.classes_code].send(JSON.stringify(send_array));
|
||||
});
|
||||
} catch (e) {console.log(e)}
|
||||
}
|
||||
else {
|
||||
response.end("Undefined request .");
|
||||
|
@ -297,7 +297,7 @@ function printStudent(item) {
|
||||
|
||||
});
|
||||
|
||||
axios.post('http://150.254.78.197:8889', JSON.stringify({
|
||||
axios.post('https://atcheck.projektstudencki.pl/students', JSON.stringify({
|
||||
classes_code: class_code,
|
||||
student_index: item[2],
|
||||
student_name: item[0],
|
||||
|
Loading…
Reference in New Issue
Block a user