Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
vesameskanen committed Jul 4, 2023
1 parent c462740 commit c8102f1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/dockerRepo.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,23 @@ module.exports = {
return fetch(tokenUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
'Content-Type': 'application/json'
},
body: loginRequest
}).then(res => {
if (res.ok) {
return res.json()
return res.json()
} else {
debug(`failed to get access token from docker hub`)
debug('failed to get access token from docker hub')
}
}).then(body => {
const token = body?.token
return fetch(url, {
headers: {
'Content-Type': 'application/json',
'Authorization': `JWT ${token}`
}})
headers: {
'Content-Type': 'application/json',
Authorization: `JWT ${token}`
}
})
}).then(res => {
if (res.ok) {
return res.json()
Expand Down

0 comments on commit c8102f1

Please sign in to comment.