Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
feat(update): add txt support
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhdev authored Feb 5, 2023
1 parent ac07e2b commit c6268a6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/functions/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ module.exports = async function update() {

let record = `"${recordType}": ${recordValue}`;

if(recordType === "TXT") {
recordValue = `"${response.record_value.toLowerCase()}"`;

record = `"${recordType}": [
{
"name": "@",
"value": ${recordValue.trim()}
}
]`
}

const fullContent = `{
"$schema": "../schemas/domain.json",
Expand Down Expand Up @@ -116,4 +127,4 @@ const fullContent = `{
})

console.log(`\nYour pull request has been submitted.\nYou can check the status of your pull request here: ${pr.data.html_url}`);
}
}

0 comments on commit c6268a6

Please sign in to comment.