mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-06 07:53:54 +00:00
refactor: minor code cleanups
This commit is contained in:
committed by
Carlos Valente
parent
61280b06b7
commit
de9af5aaa2
@@ -1,28 +1,28 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
/**
|
||||
* Utility function to log messages in green
|
||||
* Utility function to log success messages
|
||||
*/
|
||||
export function consoleSuccess(message: string) {
|
||||
console.log(inGreen(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility function to log messages in red
|
||||
* Utility function to log error messages
|
||||
*/
|
||||
export function consoleError(message: string) {
|
||||
console.error(inRed(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility function to log messages with dimmed appearance
|
||||
* Utility function to log highlighted messages
|
||||
*/
|
||||
export function consoleHighlight(message: string) {
|
||||
console.log(inCyan(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility function to log messages with dimmed appearance
|
||||
* Utility function to log messages with subdued appearance
|
||||
*/
|
||||
export function consoleSubdued(message: string) {
|
||||
console.log(inGray(message));
|
||||
|
||||
@@ -58,10 +58,13 @@ export const storage = multer.diskStorage({
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* Clears the directory that holds the uploads
|
||||
*/
|
||||
export async function clearUploadfolder() {
|
||||
try {
|
||||
await rm(uploadsFolderPath, { recursive: true });
|
||||
} catch (_) {
|
||||
//we dont care that there was no folder
|
||||
// we dont care that there was no folder
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user