fix: use @keivusal/auth module
This commit is contained in:
@@ -20,7 +20,7 @@ app
|
||||
...searchWhere,
|
||||
},
|
||||
limit: pageSize,
|
||||
offset: page * pageSize,
|
||||
offset: (page - 1) * pageSize,
|
||||
});
|
||||
ctx.body = {
|
||||
pagination: {
|
||||
|
||||
@@ -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 || {};
|
||||
|
||||
Reference in New Issue
Block a user