update api routes

box-drawing
Ondřej Hruška 7 years ago
parent 8d2d5fda42
commit 6f165da9b6
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 2
      _pages.php
  2. 2
      js/term/connection.js

@ -41,7 +41,7 @@ pg('help', 'cfg page-help', 'help', '/help');
pg('about', 'cfg page-about', 'about', '/about'); pg('about', 'cfg page-about', 'about', '/about');
pg('term', 'term', '', '/', 'title.term'); pg('term', 'term', '', '/', 'title.term');
pg('reset_screen', 'api', '', '/system/cls', 'title.term'); pg('reset_screen', 'api', '', '/api/v1/clear', 'title.term');
pg('index', 'api', '', '/', ''); pg('index', 'api', '', '/', '');

@ -202,7 +202,7 @@ module.exports = class TermConnection extends EventEmitter {
sendPing () { sendPing () {
console.log('> ping') console.log('> ping')
this.emit('ping') this.emit('ping')
$.get('http://' + window._root + '/system/ping', (resp, status) => { $.get('http://' + window._root + '/api/v1/ping', (resp, status) => {
if (status === 200) { if (status === 200) {
clearInterval(this.pingInterval) clearInterval(this.pingInterval)
console.info('Server ready, opening socket…') console.info('Server ready, opening socket…')

Loading…
Cancel
Save