feat: 写了点后端

This commit is contained in:
539943419 committed 2025-01-13 14:26:24 +08:00
1 parent e2079c5388
commit 79cc9c34d6
20 files changed
+219 -20

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import serverConfig from "../server.config"
const pathNeedAuth = serverConfig.auth.api
export default defineEventHandler((event) => {
// console.log('New request: ' + getRequestURL(event))
const path = getRequestURL(event).pathname
if(pathNeedAuth.has(path)){
// console.log('Auth needed')
return true
}
})
+4
View File
@@ -0,0 +1,4 @@
export default defineEventHandler((event) => {
checkUserData()
// console.log('New request: ' + getRequestURL(event))
})