-
Notifications
You must be signed in to change notification settings - Fork 219
Expand file tree
/
Copy pathExplorerController.js
More file actions
31 lines (25 loc) · 1.1 KB
/
ExplorerController.js
File metadata and controls
31 lines (25 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const ExplorerService = require ("../services/ExplorerService"),
FizzbuzzService = require ("../services/FizzbuzzService"),
Reader = require ("../utils/reader");
class ExplorerController{
static getExplorersByMission(mission){
const explorers = Reader.readJsonFile ("explorers.json");
return ExplorerService.filterByMission (explorers, mission);
}
static applyFizzbuzz(score){
return FizzbuzzService.applyValidationInNumber (score);
}
static getExplorersUsernamesByMission(mission){
const explorers = Reader.readJsonFile ("explorers.json");
return ExplorerService.getExplorersUsernamesByMission (explorers, mission);
}
static getExplorersAmonutByMission(mission){
const explorers = Reader.readJsonFile ("explorers.json");
return ExplorerService.getAmountOfExplorersByMission (explorers, mission);
}
static getExplorersByStack(mission){
const explorers = Reader.readJsonFile ("explorers.json");
return ExplorerService.getExplorersByStack (explorers, mission);
}
}
module.exports = ExplorerController;