File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,11 @@ class TasksAPI extends WorkerKV {
15
15
16
16
async get ( context , info , id ) {
17
17
const { cache } = await this . getCache ( context , info ) ;
18
- for ( const task of cache . Task ) {
19
- if ( task . id === id || task . tarkovDataId === id ) return task ;
18
+ const task = cache . Task . find ( t => t . id === id || t . tarkovDataId === id ) ;
19
+ if ( ! task ) {
20
+ return Promise . reject ( new GraphQLError ( `No task found with id ${ id } ` ) ) ;
20
21
}
21
- return Promise . reject ( new GraphQLError ( `No task found with id ${ id } ` ) ) ;
22
+ return task ;
22
23
}
23
24
24
25
async getTasksRequiringItem ( context , info , itemId ) {
Original file line number Diff line number Diff line change @@ -1007,6 +1007,7 @@ type ServerStatus {
1007
1007
type Skill {
1008
1008
id: ID
1009
1009
name: String
1010
+ imageLink: String
1010
1011
}
1011
1012
1012
1013
type SkillLevel {
You can’t perform that action at this time.
0 commit comments