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) {
2727 const requestHandler = options . handler ?? RPCApiHandler ( ) ;
2828
2929 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 ;
3233 if ( ! prisma ) {
3334 set . status = 500 ;
3435 return {
@@ -47,7 +48,7 @@ export function createElysiaHandler(options: ElysiaOptions) {
4748 }
4849 }
4950
50- if ( ! path ) {
51+ if ( ! path || path === '/' ) {
5152 set . status = 400 ;
5253 return {
5354 message : 'missing path parameter' ,
You can’t perform that action at this time.
0 commit comments