UI support for products!

This commit is contained in:
oitsjustjose 2022-04-26 18:19:17 -05:00
commit 29f4983a15
18 changed files with 21172 additions and 20 deletions

19
backend/init.js Normal file
View file

@ -0,0 +1,19 @@
const user = require("./dist/app/models/User").default;
const mongoose = require('mongoose');
const init = async () => {
await mongoose.connect(
`mongodb://${process.env.MONGO_URI}/${process.env.MONGO_COLLECTION}`,
{ autoIndex: true }
);
await user.updateOne({ email: 'stovallj1995@gmail.com' }, { $set: { admin: true } });
// const u = new user();
// u.email = "stovallj1995@gmail.com";
// u.password = u.hashPassword("hotdog123");
// u.isEmailValidated = true;
// await u.save();
};
init().then(process.exit);