diff --git a/backend/seeder.js b/backend/seeder.js
index a637554..c0899e7 100644
--- a/backend/seeder.js
+++ b/backend/seeder.js
@@ -20,7 +20,6 @@ const importData = async () => {
const createdUsers = await Admin.insertMany(users)
console.log('inserted users')
const adminUser = createdUsers[0]._id
- //the following code will insert admin user in each of the student data
const sampleStudents = students.map((student) => {
return { ...student, user: adminUser }
@@ -29,8 +28,6 @@ const importData = async () => {
await Dashboard.insertMany(items)
await Student.insertMany(sampleStudents)
- //among all the inserted students by the above code of line
- //we will select the first
console.log('Data imported.')
process.exit()
@@ -40,25 +37,12 @@ const importData = async () => {
}
}
-//following is for deleting the data from the database of mongodb
const exportData = async () => {
try {
await Student.deleteMany()
await Dashboard.deleteMany()
await Admin.deleteMany()
- // const createdUsers = await Admin.insertMany(users)
- // const adminUser = createdUsers[0]._id
- // //the following code will insert admin user in each of the student data
-
- // const sampleStudents = students.map((student) => {
- // return { ...student, user: adminUser }
- // })
- // await Student.insertMany(sampleStudents)
-
- // //among all the inserted students by the above code of line
- // //we will select the first
-
- // await Dashboard.insertMany(items)
+
console.log('Data destroyed.')
process.exit()
} catch (error) {
@@ -66,10 +50,7 @@ const exportData = async () => {
process.exit(1)
}
}
-//following line of code looks into the command
-//passed into the terminal
-//if the two index is '-d', then the destroy function is called
-//otherwise import function is called.
+
if (process.argv[2] === '-d') {
destroyData()
} else {
diff --git a/frontend/public/images/notFound.webp b/frontend/public/images/notFound.webp
new file mode 100644
index 0000000..173d7a3
Binary files /dev/null and b/frontend/public/images/notFound.webp differ
diff --git a/frontend/src/App.js b/frontend/src/App.js
index 00d914b..80153a3 100644
--- a/frontend/src/App.js
+++ b/frontend/src/App.js
@@ -23,9 +23,12 @@ import AllTeachers from './screens/AllTeachers'
import AllStaffs from './screens/AllStaffs'
import StaffRegister from './screens/StaffRegister'
import IncomeScreen from './screens/IncomeScreen'
+import NotFound from './screens/NotFound'
+
import ExpenseScreen from './screens/ExpenseScreen'
import underConstruction from './components/underConstruction'
import { studentAttendances } from './actions/studentActions'
+import PrivateRoute from '../src/utils/PrivateRoute'
// import ExpenseScreen from './screens/ExpenseScreen'
const App = () => {
@@ -33,83 +36,96 @@ const App = () => {