File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
docker/volumes/functions/main Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 11import { serve } from 'https://deno.land/[email protected] /http/server.ts' 22import * as jose from 'https://deno.land/x/[email protected] /index.ts' 3- import log from "../../../../frontend/utils/logger" ;
43
5- log . log ( 'main function started' )
4+ console . log ( 'main function started' )
65
76const JWT_SECRET = Deno . env . get ( 'JWT_SECRET' )
87const VERIFY_JWT = Deno . env . get ( 'VERIFY_JWT' ) === 'true'
@@ -25,7 +24,7 @@ async function verifyJWT(jwt: string): Promise<boolean> {
2524 try {
2625 await jose . jwtVerify ( jwt , secretKey )
2726 } catch ( err ) {
28- log . error ( err )
27+ console . error ( err )
2928 return false
3029 }
3130 return true
@@ -44,7 +43,7 @@ serve(async (req: Request) => {
4443 } )
4544 }
4645 } catch ( e ) {
47- log . error ( e )
46+ console . error ( e )
4847 return new Response ( JSON . stringify ( { msg : e . toString ( ) } ) , {
4948 status : 401 ,
5049 headers : { 'Content-Type' : 'application/json' } ,
@@ -66,7 +65,7 @@ serve(async (req: Request) => {
6665 }
6766
6867 const servicePath = `/home/deno/functions/${ service_name } `
69- log . error ( `serving the request with ${ servicePath } ` )
68+ console . error ( `serving the request with ${ servicePath } ` )
7069
7170 const memoryLimitMb = 150
7271 const workerTimeoutMs = 1 * 60 * 1000
You can’t perform that action at this time.
0 commit comments