Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
leonart-delux committed Dec 3, 2024
2 parents 1b99686 + 924596f commit 0b6427a
Show file tree
Hide file tree
Showing 42 changed files with 2,080 additions and 162 deletions.
135 changes: 0 additions & 135 deletions images/ONTHIGIUAKI.sql

This file was deleted.

Binary file added images/adminlogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/interestRate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/loan_admin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/manageUser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/saving.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 24 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ import loanRouter from './routes/loan.route.js';
import accountRouter from "./routes/account.route.js";
import debtRouter from './routes/debt.route.js';
import loginRouter from "./routes/login.route.js";
import UsersRouter from './routes/manageUser.router.js';
import LoansRouter from './routes/loan.router.js';
import SavingRouter from './routes/saving.router.js'
import interestRouter from './routes/interest.router.js';


import {generateRandomString} from "./utils/db.js";
import { isAuth } from './middlewares/midwares.js';

Expand All @@ -35,7 +41,8 @@ const app = express();
app.use(session({
secret: "NhatKyVienPhuong",
resave: false,
saveUninitialized: true
saveUninitialized: true,
cookie: {}
}));


Expand Down Expand Up @@ -87,16 +94,29 @@ app.set('views', './views');
app.use('/public', express.static('public'));
app.use('/images', express.static('images'));

// Admin router

app.use('',UsersRouter);
app.use('',LoansRouter);
app.use('',SavingRouter);
app.use('',interestRouter);


app.get('/Statistics', (req, res) => {
res.render('vwAdmin/statistics', {
layout: 'admin'
});
});

// User router

// Home page routing
app.get('/', function (req, res) {
app.get('/', isAuth, function (req, res) {
res.render('home_login_register', {
layout: false
});
});

// Log in routing

// Sign-in routing
app.use('/sign-in', signinRouter);

Expand Down
Loading

0 comments on commit 0b6427a

Please sign in to comment.