File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
apps/dokploy/server/api/routers
packages/server/src/services Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 44 findNotificationById ,
55 findOrganizationById ,
66 findUserById ,
7+ getDokployUrl ,
78 getUserByToken ,
89 IS_CLOUD ,
910 removeUserById ,
@@ -419,11 +420,10 @@ export const userRouter = createTRPCRouter({
419420 } ) ;
420421 }
421422
422- const admin = await findAdmin ( ) ;
423423 const host =
424424 process . env . NODE_ENV === "development"
425425 ? "http://localhost:3000"
426- : admin . user . host ;
426+ : await getDokployUrl ( ) ;
427427 const inviteLink = `${ host } /invitation?token=${ input . invitationId } ` ;
428428
429429 const organization = await findOrganizationById (
Original file line number Diff line number Diff line change @@ -110,7 +110,8 @@ export const getDokployUrl = async () => {
110110 const admin = await findAdmin ( ) ;
111111
112112 if ( admin . user . host ) {
113- return `https://${ admin . user . host } ` ;
113+ const protocol = admin . user . https ? "https" : "http" ;
114+ return `${ protocol } ://${ admin . user . host } ` ;
114115 }
115116 return `http://${ admin . user . serverIp } :${ process . env . PORT } ` ;
116117} ;
You can’t perform that action at this time.
0 commit comments