Skip to content

Commit

Permalink
update function #38
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelfdez99 committed Dec 8, 2020
1 parent 9990a80 commit e1dd4c7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions api/outlet.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
const data = require('./data.js')

async function aSeason(){
async function Season(){
var item = "";
for(let i in data.data.items){
if(data.data.items[i].season == "SPRING_SUMMER"){
item = data.data.items[i];
item += data.data.items[i];
}
}
return item;
}

module.exports = async (req,res) => {
try {
status: 200,
res.send(await aSeason())
} catch(error){
status: 500,
res.send(error)
}
try:
status:200,
res.send(await Season())
}catch(error){
status:400,
res.send("Error")
}
}

1 comment on commit e1dd4c7

@vercel
Copy link

@vercel vercel bot commented on e1dd4c7 Dec 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.