Add Missing fs module from notification.js

+ add "schedules" to "schedule" API method
merge-requests/49/head
Moe 2019-01-01 11:23:43 -08:00
parent f0f04d7b46
commit 4884597ae8
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,4 @@
var fs = require("fs")
var Discord = require("discord.js") var Discord = require("discord.js")
module.exports = function(s,config,lang){ module.exports = function(s,config,lang){
//discord bot //discord bot

View File

@ -121,13 +121,17 @@ module.exports = function(s,config,lang,app,io){
},1000 * 60 * 5) },1000 * 60 * 5)
} }
/** /**
* WebServerPath : API : Update Schedule * WebServerPath : API : Get Schedule
*/ */
app.all([ app.all([
config.webPaths.apiPrefix+':auth/schedule/:ke', config.webPaths.apiPrefix+':auth/schedule/:ke',
config.webPaths.adminApiPrefix+':auth/schedule/:ke', config.webPaths.adminApiPrefix+':auth/schedule/:ke',
config.webPaths.apiPrefix+':auth/schedule/:ke/:name', config.webPaths.apiPrefix+':auth/schedule/:ke/:name',
config.webPaths.adminApiPrefix+':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){ ],function (req,res){
s.auth(req.params,function(user){ s.auth(req.params,function(user){
var endData = { var endData = {
@ -163,7 +167,9 @@ module.exports = function(s,config,lang,app,io){
*/ */
app.all([ app.all([
config.webPaths.apiPrefix+':auth/schedule/:ke/:name/:action', 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){ ],function (req,res){
s.auth(req.params,function(user){ s.auth(req.params,function(user){
var endData = { var endData = {