diff options
author | Minteck <minteck@phoenixnet.tech> | 2021-11-03 15:19:32 +0100 |
---|---|---|
committer | Minteck <minteck@phoenixnet.tech> | 2021-11-03 15:19:32 +0100 |
commit | 92f889fe2e8662b8f66329ec1d32961942812605 (patch) | |
tree | 104e00069998406208b835664002b69daa55c81a /server/gitea.js | |
parent | 6b0d3fec160ae88aede4c53ca39ed37570838703 (diff) | |
download | rainbow-92f889fe2e8662b8f66329ec1d32961942812605.tar.gz rainbow-92f889fe2e8662b8f66329ec1d32961942812605.tar.bz2 rainbow-92f889fe2e8662b8f66329ec1d32961942812605.zip |
Finally fix Gitea
Diffstat (limited to 'server/gitea.js')
-rw-r--r-- | server/gitea.js | 5 |
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()); |