migrate to esm
This commit is contained in:
1 parent
c2e00375c1
commit
f057807b56
52 files changed
+296
-302
No files matched your search
@@ -45,6 +45,4 @@ const NormalizeData = (checks, rangeMin, rangeMax) => {
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
NormalizeData,
|
||||
};
|
||||
export { NormalizeData };
|
||||
@@ -1,4 +1,4 @@
|
||||
const sharp = require("sharp");
|
||||
import sharp from "sharp";
|
||||
/**
|
||||
* Generates a 64 * 64 pixel image from a given image
|
||||
* @param {} file
|
||||
@@ -22,6 +22,4 @@ const GenerateAvatarImage = async (file) => {
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
GenerateAvatarImage,
|
||||
};
|
||||
export { GenerateAvatarImage };
|
||||
+10
-10
@@ -1,8 +1,8 @@
|
||||
const winston = require('winston');
|
||||
import winston from "winston";
|
||||
/**
|
||||
* @module
|
||||
* @example
|
||||
* logger.info("Registered a new user!")
|
||||
* logger.info("Registered a new user!")
|
||||
* logger.warn("User not found!")
|
||||
* logger.error("Cannot save")
|
||||
* @example
|
||||
@@ -12,15 +12,15 @@ const winston = require('winston');
|
||||
* logger.error("User not found!",{"service":"Auth"})
|
||||
*/
|
||||
const logger = winston.createLogger({
|
||||
level: 'info',
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp(),
|
||||
winston.format.json()
|
||||
),
|
||||
transports: [
|
||||
level: "info",
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp(),
|
||||
winston.format.json()
|
||||
),
|
||||
transports: [
|
||||
new winston.transports.Console(),
|
||||
new winston.transports.File({ filename: 'app.log' }),
|
||||
new winston.transports.File({ filename: "app.log" }),
|
||||
],
|
||||
});
|
||||
|
||||
module.exports = logger;
|
||||
export default logger;
|
||||
@@ -114,7 +114,4 @@ const successMessages = {
|
||||
UPDATE_APP_SETTINGS: "Updated app settings successfully",
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
errorMessages,
|
||||
successMessages,
|
||||
};
|
||||
export { errorMessages, successMessages };
|
||||
@@ -27,7 +27,4 @@ const getTokenFromHeaders = (headers) => {
|
||||
return parts[1];
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
ParseBoolean,
|
||||
getTokenFromHeaders,
|
||||
};
|
||||
export { ParseBoolean, getTokenFromHeaders };
|
||||
Reference in new issue
Block a user