Skip to content

Commit

Permalink
Quotation marks changed
Browse files Browse the repository at this point in the history
  • Loading branch information
DulangaDasanayake committed Jul 17, 2024
1 parent 3d0a467 commit 39b8a60
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions backend/seeder.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import mongoose from "mongoose";
import dotenv from "dotenv";
import colors from "colors";
import users from "./data/users.js";
import products from "./data/products.js";
import User from "./models/userModel.js";
import Product from "./models/productModel.js";
import Order from "./models/orderModel.js";
import connectDB from "./config/db.js";
import mongoose from 'mongoose';
import dotenv from 'dotenv';
import colors from 'colors';
import users from './data/users.js';
import products from './data/products.js';
import User from './models/userModel.js';
import Product from './models/productModel.js';
import Order from './models/orderModel.js';
import connectDB from './config/db.js';

dotenv.config();

Expand All @@ -28,7 +28,7 @@ const importData = async () => {

await Product.insertMany(sampleProducts);

console.log("Data Imported!".green.inverse);
console.log('Data Imported!'.green.inverse);
process.exit();
} catch (error) {
console.error(`${error}`.red.inverse);
Expand All @@ -42,15 +42,15 @@ const destroyData = async () => {
await Product.deleteMany();
await User.deleteMany();

console.log("Data Destroyed!".red.inverse);
console.log('Data Destroyed!'.red.inverse);
process.exit();
} catch (error) {
console.error(`${error}`.red.inverse);
process.exit(1);
}
};

if (process.argv[2] === "-d") {
if (process.argv[2] === '-d') {
destroyData();
} else {
importData();
Expand Down

0 comments on commit 39b8a60

Please sign in to comment.