Skip to content

Commit

Permalink
final
Browse files Browse the repository at this point in the history
  • Loading branch information
Julia Khabibova committed Oct 29, 2023
1 parent 53dd079 commit ab5863a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/controllers/cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports.addCard = (req, res, next) => {
};

module.exports.getCards = (req, res, next) => {
Card.find({})
Card.find({}).sort({ createdAt: -1 })
.populate(['owner', 'likes'])
.then((cards) => res.status(HTTP_STATUS_OK).send(cards))
.catch(next);
Expand Down

0 comments on commit ab5863a

Please sign in to comment.