File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
backend/src/auth/plugins/telegram Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export const telegramPlugin = () => {
3333 } ,
3434 endpoints : {
3535 startLink : createAuthEndpoint (
36- "/telegram/link" ,
36+ "/telegram/link/start " ,
3737 {
3838 method : "POST" ,
3939 } ,
@@ -70,7 +70,7 @@ export const telegramPlugin = () => {
7070 } ,
7171 ) ,
7272 verifyLink : createAuthEndpoint (
73- "/telegram/link/:code" ,
73+ "/telegram/link/verify/ :code" ,
7474 {
7575 method : "GET" ,
7676 } ,
@@ -81,8 +81,8 @@ export const telegramPlugin = () => {
8181 message : "You must be authenticated" ,
8282 } ) ;
8383
84- const code = ctx . params . code ;
85- if ( code . length !== CODE_LENGTH || / ^ \d + $ / . test ( code ) )
84+ const code = ctx . params ? .code ;
85+ if ( ! code || code . length !== CODE_LENGTH || / ^ \d + $ / . test ( code ) )
8686 return ctx . error ( "BAD_REQUEST" , {
8787 message : "The code must be a 6-digit string" ,
8888 } ) ;
You can’t perform that action at this time.
0 commit comments