Skip to content

Commit

Permalink
Merge pull request #57 from RaghavJit/main
Browse files Browse the repository at this point in the history
Wallpaper issue resolved
  • Loading branch information
RaghavJit authored Apr 9, 2023
2 parents cc0429a + b73b821 commit bb81114
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions code/brain/testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,22 @@ exports.WallpaperTaskList = () => {

// Use the JSON data as needed
let TaskString = ''
for(let i=0; i<5; i++){
let limit = 5
if(jsonData.Task_List.length <= 5){
limit = jsonData.Task_List.length
}

for(let i=1; i<limit; i++){
console.log(jsonData.Task_List[i])
TaskString = TaskString + jsonData.Task_List[i].title + '\n';
}

return Promise.resolve(TaskString);

if(TaskString != ''){
return Promise.resolve(TaskString);
}
else{
return Promise.resolve('You are all set!')
}
})
.catch(error => {
console.error(error);
Expand Down

0 comments on commit bb81114

Please sign in to comment.