🎉 Persistent config 🎉
After sweat and tears... It's there!
This commit is contained in:
13 files changed
+178
-62
No files matched your search
@@ -6,7 +6,7 @@ function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
const files = fs.readdirSync('data/configs');
|
||||
// Strip the .json extension from the file name
|
||||
const configs = files.map((file) => file.replace('.json', ''));
|
||||
// Return the list of files
|
||||
|
||||
return res.status(200).json(configs);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user