From 4884597ae89aae3b0725945ce9ad0a625cda7022 Mon Sep 17 00:00:00 2001 From: Moe Date: Tue, 1 Jan 2019 11:23:43 -0800 Subject: [PATCH] Add Missing fs module from notification.js + add "schedules" to "schedule" API method --- libs/notification.js | 1 + libs/scheduler.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libs/notification.js b/libs/notification.js index b90daafb..9d24930f 100644 --- a/libs/notification.js +++ b/libs/notification.js @@ -1,3 +1,4 @@ +var fs = require("fs") var Discord = require("discord.js") module.exports = function(s,config,lang){ //discord bot diff --git a/libs/scheduler.js b/libs/scheduler.js index ffbffb3c..4cf08121 100644 --- a/libs/scheduler.js +++ b/libs/scheduler.js @@ -121,13 +121,17 @@ module.exports = function(s,config,lang,app,io){ },1000 * 60 * 5) } /** - * WebServerPath : API : Update Schedule + * WebServerPath : API : Get Schedule */ app.all([ config.webPaths.apiPrefix+':auth/schedule/:ke', config.webPaths.adminApiPrefix+':auth/schedule/:ke', config.webPaths.apiPrefix+':auth/schedule/:ke/:name', config.webPaths.adminApiPrefix+':auth/schedule/:ke/:name', + config.webPaths.apiPrefix+':auth/schedules/:ke', + config.webPaths.adminApiPrefix+':auth/schedules/:ke', + config.webPaths.apiPrefix+':auth/schedules/:ke/:name', + config.webPaths.adminApiPrefix+':auth/schedules/:ke/:name', ],function (req,res){ s.auth(req.params,function(user){ var endData = { @@ -163,7 +167,9 @@ module.exports = function(s,config,lang,app,io){ */ app.all([ config.webPaths.apiPrefix+':auth/schedule/:ke/:name/:action', - config.webPaths.adminApiPrefix+':auth/schedule/:ke/:name/:action' + config.webPaths.adminApiPrefix+':auth/schedule/:ke/:name/:action', + config.webPaths.apiPrefix+':auth/schedules/:ke/:name/:action', + config.webPaths.adminApiPrefix+':auth/schedules/:ke/:name/:action' ],function (req,res){ s.auth(req.params,function(user){ var endData = {