pomfy113 / Reddit-Clone

0 stars 0 forks source link

use const #9

Closed soggybag closed 6 years ago

soggybag commented 7 years ago

https://github.com/pomfy113/Reddit-Clone/blob/eee24de78e3cb28e1ee381fb5c14f522a3c1861a/models/user.js#L1

Use const here.

Better as:

var mongoose = require('mongoose');
const bcrypt = require('bcrypt');
const Schema = mongoose.Schema;
pomfy113 commented 6 years ago

Changed, but to const mongoose = require('mongoose'); const bcrypt = require('bcrypt'); const Schema = mongoose.Schema;

Instead of var mongoose = require('mongoose'); const bcrypt = require('bcrypt'); const Schema = mongoose.Schema;

If requires shouldn't be const, please advise.