File tree 2 files changed +4
-4
lines changed
packages/openapi-to-graphql/test
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ function startServer(PORT) {
93
93
const authMiddleware = ( req , res , next ) => {
94
94
if ( req . headers . authorization ) {
95
95
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 ( ':' )
97
97
98
98
if ( decoded . length === 2 ) {
99
99
let credentials = {
@@ -154,7 +154,7 @@ function startServer(PORT) {
154
154
res . send ( NextWorks [ req . params . authorId ] )
155
155
} )
156
156
157
- return new Promise ( resolve => {
157
+ return new Promise ( ( resolve ) => {
158
158
server = app . listen ( PORT , ( ) => {
159
159
console . log ( `Example API accessible on port ${ PORT } ` )
160
160
resolve ( )
@@ -166,7 +166,7 @@ function startServer(PORT) {
166
166
* Stops server.
167
167
*/
168
168
function stopServer ( ) {
169
- return new Promise ( resolve => {
169
+ return new Promise ( ( resolve ) => {
170
170
server . close ( ( ) => {
171
171
console . log ( `Stopped API server` )
172
172
resolve ( )
Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ function startServer(PORT) {
301
301
const authMiddleware = ( req , res , next ) => {
302
302
if ( req . headers . authorization ) {
303
303
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 ( ':' )
305
305
306
306
if ( decoded . length === 2 ) {
307
307
const credentials = {
You can’t perform that action at this time.
0 commit comments