ESLint: Auto reformat and fixing some warnings / errors.

This commit is contained in:
baldo 2022-08-23 20:08:53 +02:00
parent 5237db38e0
commit 91690509d3
50 changed files with 2141 additions and 1493 deletions
server/resources

View file

@ -1,16 +1,16 @@
import ErrorTypes from "../utils/errorTypes";
import Logger from "../logger";
import {getNodeStatistics} from "../services/nodeService";
import {handleJSON} from "../utils/resources";
import { getNodeStatistics } from "../services/nodeService";
import { handleJSON } from "../utils/resources";
export const get = handleJSON(async () => {
try {
const nodeStatistics = await getNodeStatistics();
return {
nodes: nodeStatistics
nodes: nodeStatistics,
};
} catch (error) {
Logger.tag('statistics').error('Error getting statistics:', error);
throw {data: 'Internal error.', type: ErrorTypes.internalError};
Logger.tag("statistics").error("Error getting statistics:", error);
throw { data: "Internal error.", type: ErrorTypes.internalError };
}
});