File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/openapi-to-graphql/test Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ function startServer(PORT) {
9393 const authMiddleware = ( req , res , next ) => {
9494 if ( req . headers . authorization ) {
9595 let encoded = req . headers . authorization . split ( ' ' ) [ 1 ]
96- let decoded = new Buffer ( encoded , 'base64' ) . toString ( 'utf8' ) . split ( ':' )
96+ let decoded = Buffer . from ( encoded , 'base64' ) . toString ( 'utf8' ) . split ( ':' )
9797
9898 if ( decoded . length === 2 ) {
9999 let credentials = {
@@ -154,7 +154,7 @@ function startServer(PORT) {
154154 res . send ( NextWorks [ req . params . authorId ] )
155155 } )
156156
157- return new Promise ( resolve => {
157+ return new Promise ( ( resolve ) => {
158158 server = app . listen ( PORT , ( ) => {
159159 console . log ( `Example API accessible on port ${ PORT } ` )
160160 resolve ( )
@@ -166,7 +166,7 @@ function startServer(PORT) {
166166 * Stops server.
167167 */
168168function stopServer ( ) {
169- return new Promise ( resolve => {
169+ return new Promise ( ( resolve ) => {
170170 server . close ( ( ) => {
171171 console . log ( `Stopped API server` )
172172 resolve ( )
Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ function startServer(PORT) {
301301 const authMiddleware = ( req , res , next ) => {
302302 if ( req . headers . authorization ) {
303303 const encoded = req . headers . authorization . split ( ' ' ) [ 1 ]
304- const decoded = new Buffer ( encoded , 'base64' ) . toString ( 'utf8' ) . split ( ':' )
304+ const decoded = Buffer . from ( encoded , 'base64' ) . toString ( 'utf8' ) . split ( ':' )
305305
306306 if ( decoded . length === 2 ) {
307307 const credentials = {
You can’t perform that action at this time.
0 commit comments