chore: 修正接口调用全限名

This commit is contained in:
MoonLeeeaf
2025-03-23 01:01:54 +08:00
parent cba1bee379
commit 58acd4887e

View File

@@ -10,6 +10,8 @@ const app = express()
const httpApp = http.createServer(app) const httpApp = http.createServer(app)
const io = new SocketIoServer(httpApp, {}) const io = new SocketIoServer(httpApp, {})
app.use('/', express.static('client/'))
const events = {} const events = {}
import { UserApi } from './api/User.js' import { UserApi } from './api/User.js'
@@ -17,7 +19,8 @@ for (let i of [
UserApi, UserApi,
]) { ]) {
for (let i2 of Object.keys(i)) { for (let i2 of Object.keys(i)) {
events[i2] = i[i2] if (i2 == 'API_NAME') continue
events[i.API_NAME + '.' + [i2]] = i[i2]
} }
} }