Alexe1900 / recommended-films

2 stars 0 forks source link

Code review 1 #3

Closed tshemsedinov closed 2 years ago

tshemsedinov commented 2 years ago
module.exports = {
  port: process.env.PORT || 80,
  api: {
    key: 'c33616c4ada296c918a35b2d9dbc7fb3',
    url: 'https://api.themoviedb.org/3/discover/movie',
  }
  // other paramaters...
};
const commands = {
  CLIENTDATA: (ws, msg) => {},
  NEWRATING: (ws, msg) => {},
};

const record = ratings[film.id]; const result = record ? avg(record) : "No rating";


- Remove code duplicate code
Alexe1900 commented 2 years ago

Done!