File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/server/src/elysia Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,9 @@ export function createElysiaHandler(options: ElysiaOptions) {
27
27
const requestHandler = options . handler ?? RPCApiHandler ( ) ;
28
28
29
29
return async ( app : Elysia ) => {
30
- app . all ( '/*' , async ( { request, body, set } : ElysiaContext ) => {
31
- const prisma = ( await options . getPrisma ( { request, body, set } as ElysiaContext ) ) as DbClientContract ;
30
+ app . all ( '/*' , async ( ctx : ElysiaContext ) => {
31
+ const { request, body, set } = ctx ;
32
+ const prisma = ( await options . getPrisma ( ctx ) ) as DbClientContract ;
32
33
if ( ! prisma ) {
33
34
set . status = 500 ;
34
35
return {
@@ -47,7 +48,7 @@ export function createElysiaHandler(options: ElysiaOptions) {
47
48
}
48
49
}
49
50
50
- if ( ! path ) {
51
+ if ( ! path || path === '/' ) {
51
52
set . status = 400 ;
52
53
return {
53
54
message : 'missing path parameter' ,
You can’t perform that action at this time.
0 commit comments