chore: Use key instead of name as parameter for getApp query

This commit is contained in:
Faruk AYDIN
2021-10-17 16:04:20 +02:00
committed by Ali BARIN
parent 48ba4565e4
commit 8de65e52ab
6 changed files with 11 additions and 9 deletions

View File

@@ -16,6 +16,11 @@ class App {
const rawAppData = fs.readFileSync(this.folderPath + `/${name}/info.json`, 'utf-8');
return JSON.parse(rawAppData);
}
static findOneByKey(key: string): object {
const rawAppData = fs.readFileSync(this.folderPath + `/${key}/info.json`, 'utf-8');
return JSON.parse(rawAppData);
}
}
export default App;