mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-26 19:04:23 +00:00
fix: resolve lint and typecheck errors in API and Authz tests
This commit is contained in:
@@ -6,7 +6,10 @@ import { projectService } from '@/services/project/project'
|
||||
import { assetService } from '@/services/asset/asset'
|
||||
|
||||
vi.mock('@/api/middleware/auth', () => ({
|
||||
authMiddleware: async (c: Context, next: Next) => {
|
||||
authMiddleware: async (
|
||||
c: Context<{ Variables: { user: { id: string; name: string } } }>,
|
||||
next: Next,
|
||||
) => {
|
||||
c.set('user', { id: 'user1', name: 'Test User' })
|
||||
await next()
|
||||
},
|
||||
@@ -17,7 +20,7 @@ vi.mock('@/services/project/project')
|
||||
vi.mock('@/services/asset/asset')
|
||||
|
||||
describe('project api', () => {
|
||||
const app = new Hono()
|
||||
const app = new Hono<{ Variables: { user: { id: string; name: string } } }>()
|
||||
.use('*', async (c, next) => {
|
||||
c.set('user', { id: 'user1', name: 'Test User' })
|
||||
await next()
|
||||
|
||||
Reference in New Issue
Block a user