fix version date
This commit is contained in:
Generated
+22
@@ -16,6 +16,7 @@
|
|||||||
"dotenv": "^16.4.7",
|
"dotenv": "^16.4.7",
|
||||||
"express": "^4.21.2",
|
"express": "^4.21.2",
|
||||||
"jsonwebtoken": "^9.0.2",
|
"jsonwebtoken": "^9.0.2",
|
||||||
|
"moment-timezone": "^0.5.47",
|
||||||
"mongoose": "^8.9.5"
|
"mongoose": "^8.9.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -981,6 +982,27 @@
|
|||||||
"node": "*"
|
"node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/moment": {
|
||||||
|
"version": "2.30.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
|
||||||
|
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/moment-timezone": {
|
||||||
|
"version": "0.5.47",
|
||||||
|
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.47.tgz",
|
||||||
|
"integrity": "sha512-UbNt/JAWS0m/NJOebR0QMRHBk0hu03r5dx9GK8Cs0AS3I81yDcOc9k+DytPItgVvBP7J6Mf6U2n3BPAacAV9oA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"moment": "^2.29.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/mongodb": {
|
"node_modules/mongodb": {
|
||||||
"version": "6.12.0",
|
"version": "6.12.0",
|
||||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.12.0.tgz",
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
"dotenv": "^16.4.7",
|
"dotenv": "^16.4.7",
|
||||||
"express": "^4.21.2",
|
"express": "^4.21.2",
|
||||||
"jsonwebtoken": "^9.0.2",
|
"jsonwebtoken": "^9.0.2",
|
||||||
|
"moment-timezone": "^0.5.47",
|
||||||
"mongoose": "^8.9.5"
|
"mongoose": "^8.9.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
const axios = require("axios");
|
const axios = require("axios");
|
||||||
const express = require("express");
|
const express = require("express");
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
|
const moment = require('moment-timezone');
|
||||||
|
|
||||||
// Fetch the latest commit from a GitHub repository
|
// Fetch the latest commit from a GitHub repository
|
||||||
async function fetchLatestCommitFromGitHub() {
|
async function fetchLatestCommitFromGitHub() {
|
||||||
@@ -41,7 +42,7 @@ async function fetchLatestCommitFromGitHub() {
|
|||||||
version: (latestCommit.sha).substring(0,5),
|
version: (latestCommit.sha).substring(0,5),
|
||||||
message: latestCommit.message,
|
message: latestCommit.message,
|
||||||
author: latestCommit.author,
|
author: latestCommit.author,
|
||||||
date: latestCommit.date,
|
date: moment(latestCommit.date).tz('America/New_York').format('YYYY-MM-DD HH:mm:ss'),
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error fetching latest commit:", error);
|
console.error("Error fetching latest commit:", error);
|
||||||
|
|||||||
Reference in New Issue
Block a user