Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit 3970b8e3 authored by 65160381's avatar 65160381
Browse files

9.5

parent 5f5e8842
Branches
No related tags found
No related merge requests found
Pipeline #620 passed with warnings
...@@ -56,6 +56,7 @@ app.use(express.static(path.join(__dirname, 'public'))); ...@@ -56,6 +56,7 @@ app.use(express.static(path.join(__dirname, 'public')));
// Session และ routes // Session และ routes
app.get('/', (req, res) => { app.get('/', (req, res) => {
if (req.session.user) { if (req.session.user) {
res.locals.user = req.session.user; // ส่งข้อมูล user จาก session ไปยัง template
res.sendFile(path.join(__dirname, 'public', 'index.html')); res.sendFile(path.join(__dirname, 'public', 'index.html'));
} else { } else {
res.redirect('/login'); res.redirect('/login');
......
...@@ -15,9 +15,13 @@ ...@@ -15,9 +15,13 @@
<!-- Cart items will be dynamically loaded here --> <!-- Cart items will be dynamically loaded here -->
</div> </div>
<button>
<div class="checkout-button" onclick="processCheckout()">Confirm and Checkout</div>
</button>
<footer> <footer>
<p>&copy; 2025 ASA</p> <p>&copy; 2025 ASA</p>
<div class="checkout-button" onclick="processCheckout()">Confirm and Checkout</div>
</footer> </footer>
<script> <script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment