fixed little controller issue and wired up stats in top bar
This commit is contained in:
16
get_stats_paths.cjs
Normal file
16
get_stats_paths.cjs
Normal file
@@ -0,0 +1,16 @@
|
||||
const fs = require('fs');
|
||||
try {
|
||||
const content = fs.readFileSync('./romm_swagger.json', 'utf16le');
|
||||
let data;
|
||||
try {
|
||||
data = JSON.parse(content);
|
||||
} catch (e) {
|
||||
// maybe it's utf8
|
||||
data = JSON.parse(fs.readFileSync('./romm_swagger.json', 'utf8'));
|
||||
}
|
||||
const paths = Object.keys(data.paths);
|
||||
const targets = paths.filter(p => p.toLowerCase().includes('stat') || p.toLowerCase().includes('count') || p.toLowerCase().includes('size') || p.toLowerCase().includes('system'));
|
||||
console.log("Matching Endpoints:", targets);
|
||||
} catch (e) {
|
||||
console.error("Failed:", e.message);
|
||||
}
|
||||
Reference in New Issue
Block a user