This repository has been archived on 2025-11-04. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
qoverflow/server/utils/getUserLevel.js
2022-08-18 17:35:12 -04:00

14 lines
413 B
JavaScript

function getUserLevel(points) {
if (points > 10000) return 9;
else if (points > 3000) return 8;
else if (points > 2000) return 7;
else if (points > 1000) return 6;
else if (points > 125) return 5;
else if (points > 75) return 4;
else if (points > 50) return 3;
else if (points > 15) return 2;
else if (points > 0) return 1;
else return 0;
}
module.exports = getUserLevel;