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-07-22 14:59:57 -05:00

20 lines
403 B
JavaScript

function getUserLevel(points) {
if (points > 10000)
return 7;
else if (points > 3000)
return 6;
else if (points > 1000)
return 5;
else if (points > 125)
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;