chore: add .gitignore, remove VSCode settings, and optimize database queries

This commit is contained in:
ethan.chen
2025-06-13 14:42:57 +08:00
parent e610605c76
commit 499321a842
7 changed files with 20 additions and 30 deletions

View File

@@ -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) {