Skip to content

Commit

Permalink
fix: Array.push() doesn’t return an array
Browse files Browse the repository at this point in the history
  • Loading branch information
tensor5 committed Oct 21, 2024
1 parent 39322a5 commit 76882d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/register-fast-onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ async function createPublisher(apiURL, pasetoApiToken, pec, amministrazione, ipa
async function updateExistingPublisher(apiURL, pasetoApiToken, publisherID, pec, url, codeHosting) {
const apiPayload = {
email: pec,
codeHosting: codeHosting.push({
url: url
}),
codeHosting: [ ...codeHosting, { url } ],
};

const res = await fetch(`${apiURL}/publishers/${publisherID}`, {
Expand Down
4 changes: 1 addition & 3 deletions src/registered.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ async function createPublisher(apiURL, pasetoApiToken, pec, amministrazione, ipa
async function updateExistingPublisher(apiURL, pasetoApiToken, publisherID, pec, url, codeHosting) {
const apiPayload = {
email: pec,
codeHosting: codeHosting.push({
url: url
}),
codeHosting: [ ...codeHosting, { url } ],
};

const res = await fetch(`${apiURL}/publishers/${publisherID}`, {
Expand Down

0 comments on commit 76882d7

Please sign in to comment.