fix: use @keivusal/auth module

This commit is contained in:
2024-11-20 16:50:25 +08:00
parent dc69b95f39
commit 801e05b23e
7 changed files with 25 additions and 26 deletions

View File

@@ -20,7 +20,7 @@ app
...searchWhere,
},
limit: pageSize,
offset: page * pageSize,
offset: (page - 1) * pageSize,
});
ctx.body = {
pagination: {

View File

@@ -1,13 +1,13 @@
import { app } from '@/app.ts';
import { Org } from '@/models/org.ts';
import { User } from '@/models/user.ts';
import { CustomError } from '@kevisual/router';
app
.route({
path: 'user',
key: 'me',
middleware: ['auth'],
isDebug: true,
})
.define(async (ctx) => {
const tokenUser = ctx.state?.tokenUser || {};