Compare commits
2 commits
b809e6a5e0
...
07a36f99dd
Author | SHA1 | Date | |
---|---|---|---|
07a36f99dd | |||
959320f060 |
3 changed files with 36 additions and 6 deletions
|
@ -50,13 +50,17 @@ export default class ApiController extends Controller {
|
||||||
if (Date.now() < cacheExpiry) {
|
if (Date.now() < cacheExpiry) {
|
||||||
this.ok(cachedClient);
|
this.ok(cachedClient);
|
||||||
} else {
|
} else {
|
||||||
const response = await fetch(`http://${Config.githost}/tgpholly/t00-multiuser/raw/branch/master/client/Terminal-00-Multiuser.user.js?${Date.now()}`);
|
fetch(`http://${Config.githost}/tgpholly/t00-multiuser/raw/branch/master/client/Terminal-00-Multiuser.user.js?${Date.now()}`)
|
||||||
if (response.status === 200) {
|
.then(async response => {
|
||||||
cachedClient = await response.text();
|
if (response.status === 200) {
|
||||||
return this.ok(cachedClient);
|
cachedClient = await response.text();
|
||||||
} else {
|
return this.ok(cachedClient);
|
||||||
|
} else {
|
||||||
|
return this.badRequest();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
return this.badRequest();
|
return this.badRequest();
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
25
server/package-lock.json
generated
25
server/package-lock.json
generated
|
@ -26,6 +26,7 @@
|
||||||
"@types/node": "^22.10.2",
|
"@types/node": "^22.10.2",
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
"check-outdated": "^2.12.0",
|
"check-outdated": "^2.12.0",
|
||||||
|
"node": "^22.12.0",
|
||||||
"nodemon": "^3.1.9",
|
"nodemon": "^3.1.9",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"terser": "^5.37.0",
|
"terser": "^5.37.0",
|
||||||
|
@ -2255,6 +2256,30 @@
|
||||||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
|
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/node": {
|
||||||
|
"version": "22.12.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/node/-/node-22.12.0.tgz",
|
||||||
|
"integrity": "sha512-Tg4X/MMYSfFNt18iNyqI5TTHvzhqi7A3e11BXRb085L7e5RYfC9PjsJhsvUB7SNwoyI7GCJhfFR73UAzRi6/cg==",
|
||||||
|
"dev": true,
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"node-bin-setup": "^1.0.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"node": "bin/node"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"npm": ">=5.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/node-bin-setup": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/node-bin-setup/-/node-bin-setup-1.1.3.tgz",
|
||||||
|
"integrity": "sha512-opgw9iSCAzT2+6wJOETCpeRYAQxSopqQ2z+N6BXwIMsQQ7Zj5M8MaafQY8JMlolRR6R1UXg2WmhKp0p9lSOivg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
"node_modules/nodemon": {
|
"node_modules/nodemon": {
|
||||||
"version": "3.1.9",
|
"version": "3.1.9",
|
||||||
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz",
|
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz",
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
"@types/node": "^22.10.2",
|
"@types/node": "^22.10.2",
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
"check-outdated": "^2.12.0",
|
"check-outdated": "^2.12.0",
|
||||||
|
"node": "^22.12.0",
|
||||||
"nodemon": "^3.1.9",
|
"nodemon": "^3.1.9",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"terser": "^5.37.0",
|
"terser": "^5.37.0",
|
||||||
|
|
Loading…
Reference in a new issue