feat: Implement getAll and getAllByName graphQL queries

This commit is contained in:
Faruk AYDIN
2021-10-08 21:24:27 +02:00
committed by Ali BARIN
parent a39ae93ca4
commit 0e684570f8
7 changed files with 121 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
import fs from 'fs';
class App {
static folderPath = __dirname + '/../apps'
static list = fs.readdirSync(this.folderPath);
static findAll(): string[] {
return this.list;
}
static findAllByName(name: string): string[] {
return this.list.filter((app) => app.includes(name.toLowerCase()));
}
}
export default App;