Use string interpolation
This commit is contained in:
@ -79,7 +79,7 @@ const files = glob.sync('**/*.js', {
|
||||
});
|
||||
|
||||
const endpoints: IEndpoint[] = files.map(f => {
|
||||
const ep = require('./endpoints/' + f);
|
||||
const ep = require(`./endpoints/${f}`);
|
||||
|
||||
return {
|
||||
name: f.replace('.js', ''),
|
||||
|
@ -16,7 +16,7 @@ export default function(request: websocket.request, connection: websocket.connec
|
||||
|
||||
switch (msg.type) {
|
||||
case 'requestLog':
|
||||
ev.once('notesStatsLog:' + msg.id, statsLog => {
|
||||
ev.once(`notesStatsLog:${msg.id}`, statsLog => {
|
||||
connection.send(JSON.stringify({
|
||||
type: 'statsLog',
|
||||
body: statsLog
|
||||
|
@ -16,7 +16,7 @@ export default function(request: websocket.request, connection: websocket.connec
|
||||
|
||||
switch (msg.type) {
|
||||
case 'requestLog':
|
||||
ev.once('serverStatsLog:' + msg.id, statsLog => {
|
||||
ev.once(`serverStatsLog:${msg.id}`, statsLog => {
|
||||
connection.send(JSON.stringify({
|
||||
type: 'statsLog',
|
||||
body: statsLog
|
||||
|
Reference in New Issue
Block a user