File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export class API {
2020
2121 static async init (
2222 frontendUrls : string [ ] = [ ] ,
23- disableDocs = false ,
23+ disableDocs = false
2424 ) {
2525
2626 this . app = new Hono ( ) ;
@@ -56,7 +56,7 @@ export class API {
5656
5757 Logger . error ( "API Error:" , err ) ;
5858 return c . json ( { success : false , message : 'Internal Server Error' } , 500 ) ;
59- } )
59+ } ) ;
6060
6161
6262 // Apply global auth middleware
@@ -75,6 +75,10 @@ export class API {
7575 return c . redirect ( "/docs" ) ;
7676 } ) ;
7777 setupDocs ( this . app ) ;
78+ } else {
79+ this . app . get ( "/" , ( c ) => {
80+ return c . json ( { message : "Delivr API is running. Documentation is disabled." } ) ;
81+ } ) ;
7882 }
7983
8084 }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import { MailsModel } from "../src/api/routes/mail-accounts/mailboxes/mails/mode
1717type SeededUser = Omit < DB . Models . User , "password_hash" > & { password : string } ;
1818type SeededSession = Awaited < ReturnType < typeof SessionHandler . createSession > > ;
1919
20- async function seedUser ( role : "admin" | "user" , overrides : Partial < DB . Models . User > = { } , password = "TestP@ssw0rd" ) {
20+ async function seedUser ( role : DB . Models . User [ "role" ] , overrides : Partial < DB . Models . User > = { } , password = "TestP@ssw0rd" ) {
2121 const user = DB . instance ( ) . insert ( DB . Schema . users ) . values ( {
2222 username : overrides . username ?? `user_${ randomUUID ( ) . slice ( 0 , 8 ) } ` ,
2323 display_name : overrides . display_name ?? "Test User" ,
You can’t perform that action at this time.
0 commit comments