aboutsummaryrefslogtreecommitdiff
path: root/api/routes/getPeers/index.js
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2025-04-14 16:54:13 +0300
committerkaotisk <kaotisk@arching-kaos.org>2025-04-14 16:54:13 +0300
commit333864c5fe098b6993066d73b8d6d8e6fb358eb0 (patch)
tree039442bc2fb7f1e535087639db34ca3afa30d455 /api/routes/getPeers/index.js
parentb9c719d094c3ac8a802b59d7667a97514d03faed (diff)
downloadarching-kaos-tools-333864c5fe098b6993066d73b8d6d8e6fb358eb0.tar.gz
arching-kaos-tools-333864c5fe098b6993066d73b8d6d8e6fb358eb0.tar.bz2
arching-kaos-tools-333864c5fe098b6993066d73b8d6d8e6fb358eb0.zip
[api] Removes unnecessary anonymous JS functions
Diffstat (limited to 'api/routes/getPeers/index.js')
-rw-r--r--api/routes/getPeers/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/api/routes/getPeers/index.js b/api/routes/getPeers/index.js
index b18a015..47c075d 100644
--- a/api/routes/getPeers/index.js
+++ b/api/routes/getPeers/index.js
@@ -1,7 +1,8 @@
const config = require('../../config');
const fs = require('fs');
-module.exports = (req, res) => {
+function getPeers(req, res)
+{
const path = config.peersFile;
if(fs.existsSync(path)){
res.writeHead(200, {'Content-Type': 'application/json'});
@@ -11,3 +12,4 @@ module.exports = (req, res) => {
res.end({"error":"No peers :("})
}
};
+module.exports = getPeers;