Added missing ) character.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2025-02-11 22:12:57 +02:00
parent 1d8347cc23
commit 563a508e26

View file

@ -28,7 +28,7 @@ function accessToken(req) {
token = req.query.access_token; token = req.query.access_token;
} }
return ( return (
token !== undefined && token !== undefined &&
valid_token !== undefined && valid_token !== undefined &&
token == valid_token token == valid_token
); );
@ -74,7 +74,7 @@ Meteor.startup(() => {
// } // }
// List of trusted ip adress will be found in environment variable "METRICS_ACCEPTED_IP_ADDRESS" (separeted with commas) // List of trusted ip adress will be found in environment variable "METRICS_ACCEPTED_IP_ADDRESS" (separeted with commas)
if (acceptedIpAddress(ipAddress) || (accessToken(req)) { if (acceptedIpAddress(ipAddress) || (accessToken(req))) {
let metricsRes = ''; let metricsRes = '';
let resCount = 0; let resCount = 0;
//connected users //connected users
@ -195,12 +195,12 @@ Meteor.startup(() => {
metricsRes += metricsRes +=
'# Top 10 boards with most activities dated 30 days ago\n'; '# Top 10 boards with most activities dated 30 days ago\n';
//Get top 10 table with most activities in current month //Get top 10 table with most activities in current month
const boardTitleWithMostActivities = getBoardTitleWithMostActivities( const boardTitleWithMostActivities = getBoardTitleWithMostActivities(
dateWithXdaysAgo, dateWithXdaysAgo,
xdays, xdays,
); );
const boardWithMostActivities = boardTitleWithMostActivities.map( const boardWithMostActivities = boardTitleWithMostActivities.map(
(board) => board.lookup[0].title, (board) => board.lookup[0].title,
); );
@ -210,7 +210,7 @@ Meteor.startup(() => {
`wekan_top10BoardsWithMostActivities{n="${title}"} ${ `wekan_top10BoardsWithMostActivities{n="${title}"} ${
index + 1 index + 1
}` + '\n'; }` + '\n';
}); });
res.writeHead(200); // HTTP status res.writeHead(200); // HTTP status
res.end(metricsRes); res.end(metricsRes);