This commit is contained in:
eoao
2025-04-26 17:24:39 +08:00
commit 24ba4772e6
107 changed files with 13612 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import app from '../hono/hono';
import userService from '../service/user-service';
import result from '../model/result';
import userContext from '../security/user-context';
app.get('/user/loginUserInfo', async (c) => {
const user = await userService.loginUserInfo(c, await userContext.getUserId(c));
return c.json(result.ok(user));
});
app.put('/user/resetPassword', async (c) => {
await userService.resetPassword(c, await c.req.json(), await userContext.getUserId(c));
return c.json(result.ok());
});
app.delete('/user/delete', async (c) => {
await userService.delete(c, await userContext.getUserId(c));
return c.json(result.ok());
})