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 {
1515
1616 async get ( context , info , id ) {
1717 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 } ` ) ) ;
2021 }
21- return Promise . reject ( new GraphQLError ( `No task found with id ${ id } ` ) ) ;
22+ return task ;
2223 }
2324
2425 async getTasksRequiringItem ( context , info , itemId ) {
Original file line number Diff line number Diff line change @@ -1003,6 +1003,7 @@ type ServerStatus {
10031003type Skill {
10041004 id: ID
10051005 name: String
1006+ imageLink: String
10061007}
10071008
10081009type SkillLevel {
You can’t perform that action at this time.
0 commit comments