Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit b6310369 authored by 65160258's avatar 65160258
Browse files

auth

parent fab08bf6
No related branches found
No related tags found
No related merge requests found
// routes/auth.js (เส้นทางเกี่ยวกับการรับรองตัวตน)
// routes/auth.js
const express = require('express');
const router = express.Router();
const bcrypt = require('bcrypt');
......@@ -39,7 +39,6 @@ router.post('/register', async (req, res) => {
const { username, email, password, phone, f_name, l_name, } = req.body;
try {
const hashedPassword = await bcrypt.hash(password, 10);
// เปลี่ยนจาก `user` เป็น `users`
await db.query(
`INSERT INTO users
(username, email, password, phone, f_name, l_name, role)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment