update write for functions
This commit is contained in:
parent
a6b9935ce1
commit
42785fe8b9
|
|
@ -1,7 +1,7 @@
|
|||
const fs = require("fs");
|
||||
const moment = require("moment");
|
||||
|
||||
export const addLogFunction = async (fileName, data, functionName) => {
|
||||
const addLogFunction = async (fileName, data, functionName) => {
|
||||
try {
|
||||
fs.exists(fileName, async (exists) => {
|
||||
if (exists) {
|
||||
|
|
@ -32,3 +32,5 @@ export const addLogFunction = async (fileName, data, functionName) => {
|
|||
console.log(error);
|
||||
}
|
||||
};
|
||||
|
||||
module.exports.addLogFunction = addLogFunction;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
const puppeteer = require("puppeteer");
|
||||
const zulip = require("zulip-js");
|
||||
const { addLogFunction } = require("./addLogFunction");
|
||||
const { addLogFunction } = require("./addLogFunctionJS");
|
||||
|
||||
(async () => {
|
||||
// Launch a headless browser
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ const moment = require("moment");
|
|||
const zulip = require("zulip-js");
|
||||
const { exec } = require("child_process");
|
||||
const fs = require("fs");
|
||||
const { addLogFunction } = require("./addLogFunction");
|
||||
const { addLogFunction } = require("./addLogFunctionJS");
|
||||
|
||||
const config = {
|
||||
username: "networktool-bot@zulip.ipsupply.com.au",
|
||||
|
|
|
|||
Loading…
Reference in New Issue