aboutsummaryrefslogtreecommitdiff
path: root/server/gitea.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/gitea.js')
-rw-r--r--server/gitea.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/gitea.js b/server/gitea.js
index 70606a7..b9caa4c 100644
--- a/server/gitea.js
+++ b/server/gitea.js
@@ -9,7 +9,7 @@ log.verbose("Initializing Gitea projects refresh...")
function get(url) {
return {
- stdout: require('os').platform() === "win32" ? require('child_process').execSync("curl -s -A \"Sattelite/" + mpws.version + "\" -X GET \"https://source.minteck.org/" + url + "\" -H \"accept: application/json\" -H \"authorization: Basic " + fs.readFileSync(serverRoot + "/auth.txt") + "\"") : require('child_process').execSync("bash -c 'curl -s -A \"Sattelite/" + mpws.version + "\" -X GET \"https://source.minteck.org/" + url + "\" -H \"accept: application/json\" -H \"authorization: Basic " + fs.readFileSync(serverRoot + "/auth.txt") + "\"'")
+ stdout: require('child_process').execSync("curl -s -A \"Sattelite/" + mpws.version + "\" -X GET \"https://source.minteck.org/" + url + "\" -H \"accept: application/json\" -H \"authorization: Basic " + fs.readFileSync(serverRoot + "/auth.txt") + "\"").toString().trim()
};
}
@@ -78,9 +78,10 @@ function giteaRefresh() {
if (!thisRepo.empty && !thisRepo.private && !thisRepo.internal) {
thisRepo.name = repo_data.full_name.trim() !== "" ? repo_data.full_name : null;
thisRepo.icon = repo_data.avatar_url.trim() !== "" ? repo_data.avatar_url : null;
+ thisRepo.description = repo_data.description.trim() !== "" ? repo_data.description : null;
thisRepo.size = repo_data.size;
thisRepo.website = repo_data.website.trim() !== "" ? repo_data.website : null;
- thisRepo.update = repo_data.updated_at.trim() !== "" ? repo_data.updated_at : null;
+ thisRepo.update = new Date(repo_data.updated_at) - 1 + 1;
sattelite_data = JSON.parse(get("/api/v1/repos/" + repo + "/contents/SatteliteGiteaData.txt").stdout.toString());