chore: add .gitignore, remove VSCode settings, and optimize database queries
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Date: 2025-06-11 17:57:58
|
||||
* @LastEditors: 陈子健
|
||||
* @LastEditTime: 2025-06-13 13:50:14
|
||||
* @LastEditTime: 2025-06-13 14:23:37
|
||||
* @FilePath: /my-score/honoback/routes/user.ts
|
||||
*/
|
||||
import { Hono } from 'hono'
|
||||
@@ -19,7 +19,7 @@ user.post('/login', async (c) => {
|
||||
const { username, password } = await c.req.json()
|
||||
|
||||
// 从数据库验证用户
|
||||
const user = await db.prepare('SELECT * FROM users WHERE username = ? AND password = ?')
|
||||
const user = db.prepare('SELECT * FROM users WHERE username = ? AND password = ?')
|
||||
.get(username, password)
|
||||
|
||||
if (user) {
|
||||
|
||||
Reference in New Issue
Block a user