porkbun: cleanup implementation

This commit is contained in:
Girish Ramakrishnan
2023-03-18 09:41:20 +01:00
parent 3616fbb51c
commit f74e2cbee3
2 changed files with 105 additions and 68 deletions
+3
View File
@@ -29,6 +29,7 @@ function injectPrivateFields(newConfig, currentConfig) {
// in-place injection of tokens and api keys which came in with constants.SECRET_PLACEHOLDER
}
// replaces any existing records or creates new records of subdomain+type with values
async function upsert(domainObject, subdomain, type, values) {
assert.strictEqual(typeof domainObject, 'object');
assert.strictEqual(typeof subdomain, 'string');
@@ -40,6 +41,7 @@ async function upsert(domainObject, subdomain, type, values) {
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'upsert is not implemented');
}
// NOTE: returns empty array when there are no records
async function get(domainObject, subdomain, type) {
assert.strictEqual(typeof domainObject, 'object');
assert.strictEqual(typeof subdomain, 'string');
@@ -50,6 +52,7 @@ async function get(domainObject, subdomain, type) {
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'get is not implemented');
}
// must only delete records that match values
async function del(domainObject, subdomain, type, values) {
assert.strictEqual(typeof domainObject, 'object');
assert.strictEqual(typeof subdomain, 'string');