File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,12 @@ export async function groupInvite(
15
15
return discordTextResponse ( `<@&${ roleId } > is not a valid group.` ) ;
16
16
}
17
17
18
- const groupName = group . name . replace ( / ^ g r o u p - / , "" ) ;
18
+ const groupName = group . name . replace ( / ^ g r o u p - / , "" ) . replace ( / - / g, " " ) ;
19
+ const encodedGroupName = encodeURIComponent ( groupName ) ;
19
20
20
21
return discordTextResponse (
21
22
`<@${ userId } > join the group <@&${ roleId } > via the link below:\n ${
22
23
config ( env ) . DASHBOARD_SITE_URL
23
- } /groups/?dev=true&name=${ groupName } `
24
+ } /groups/?dev=true&name=${ encodedGroupName } `
24
25
) ;
25
26
}
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ import { generateInviteLink } from "./controllers/generateDiscordInvite";
22
22
import { sendProfileBlockedMessage } from "./controllers/profileHandler" ;
23
23
import { sendTaskUpdatesHandler } from "./controllers/taskUpdatesHandler" ;
24
24
25
+ import config from "./../config/config" ;
26
+
25
27
const router = Router ( ) ;
26
28
27
29
router . get ( "/" , async ( ) => {
@@ -60,6 +62,17 @@ router.post("/profile/blocked", sendProfileBlockedMessage);
60
62
61
63
router . post ( "/task/update" , sendTaskUpdatesHandler ) ;
62
64
65
+ router . get ( "/ankush" , async ( request , env , ctx : ExecutionContext ) => {
66
+ ctx . waitUntil ( send ( env ) ) ;
67
+
68
+ const url = config ( env ) . TRACKING_CHANNEL_URL ;
69
+
70
+ return new JSONResponse (
71
+ `CURRENT_ENVIRONMENT: ${ env . CURRENT_ENVIRONMENT } , tracking url - ${ url } ` ,
72
+ { status : 200 }
73
+ ) ;
74
+ } ) ;
75
+
63
76
router . post ( "/" , async ( request , env , ctx : ExecutionContext ) => {
64
77
const message : discordMessageRequest = await request . json ( ) ;
65
78
You can’t perform that action at this time.
0 commit comments