diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-26 10:36:24 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-01-09 11:15:15 +0100 |
commit | cef534ed53e4518fe0acf581bfe880788d42fc36 (patch) | |
tree | 115b51ea5136849a2336d44915c7780649f25dc2 /server/controllers/tracker.ts | |
parent | 1de1d05f4c61fe059fa5e24e79c92582f0e7e4b3 (diff) | |
download | PeerTube-cef534ed53e4518fe0acf581bfe880788d42fc36.tar.gz PeerTube-cef534ed53e4518fe0acf581bfe880788d42fc36.tar.zst PeerTube-cef534ed53e4518fe0acf581bfe880788d42fc36.zip |
Add user notification base code
Diffstat (limited to 'server/controllers/tracker.ts')
-rw-r--r-- | server/controllers/tracker.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/tracker.ts b/server/controllers/tracker.ts index 9bc7586d1..53f1653b5 100644 --- a/server/controllers/tracker.ts +++ b/server/controllers/tracker.ts | |||
@@ -59,7 +59,7 @@ const onHttpRequest = trackerServer.onHttpRequest.bind(trackerServer) | |||
59 | trackerRouter.get('/tracker/announce', (req, res) => onHttpRequest(req, res, { action: 'announce' })) | 59 | trackerRouter.get('/tracker/announce', (req, res) => onHttpRequest(req, res, { action: 'announce' })) |
60 | trackerRouter.get('/tracker/scrape', (req, res) => onHttpRequest(req, res, { action: 'scrape' })) | 60 | trackerRouter.get('/tracker/scrape', (req, res) => onHttpRequest(req, res, { action: 'scrape' })) |
61 | 61 | ||
62 | function createWebsocketServer (app: express.Application) { | 62 | function createWebsocketTrackerServer (app: express.Application) { |
63 | const server = http.createServer(app) | 63 | const server = http.createServer(app) |
64 | const wss = new WebSocketServer({ server: server, path: '/tracker/socket' }) | 64 | const wss = new WebSocketServer({ server: server, path: '/tracker/socket' }) |
65 | wss.on('connection', function (ws, req) { | 65 | wss.on('connection', function (ws, req) { |
@@ -76,7 +76,7 @@ function createWebsocketServer (app: express.Application) { | |||
76 | 76 | ||
77 | export { | 77 | export { |
78 | trackerRouter, | 78 | trackerRouter, |
79 | createWebsocketServer | 79 | createWebsocketTrackerServer |
80 | } | 80 | } |
81 | 81 | ||
82 | // --------------------------------------------------------------------------- | 82 | // --------------------------------------------------------------------------- |