Skip to content

Commit 442cfff

Browse files
committed
renamed
1 parent 0b580b5 commit 442cfff

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

src/api/list_dns_records.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ApiRequestError from '../error/api_request_error.ts';
22
import FetchRequestError from '../error/fetch_request_error.ts';
3-
import { DNSRecord } from '../record/dns_record.ts';
3+
import { DnsRecord } from '../record/dns_record.ts';
44
import supportedDnsRecordTypes from '../record/dns_record_type.ts';
55
import { ListDnsRecordsOption } from './list_dns_records_option.ts';
66

@@ -10,7 +10,7 @@ import { ListDnsRecordsOption } from './list_dns_records_option.ts';
1010
* @param options Options for the API fetch
1111
* @returns List of all DNS records found.
1212
*/
13-
export default function listDnsRecordsFromApi(options: ListDnsRecordsOption) : Promise<DNSRecord[]> {
13+
export default function listDnsRecordsFromApi(options: ListDnsRecordsOption) : Promise<DnsRecord[]> {
1414
return fetch(
1515
`${options.apiEndpoint}zones/${options.zoneId}/dns_records?type=${supportedDnsRecordTypes.join(',')}`,
1616
{

src/logging/record_updated.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { DNSRecord } from '../record/dns_record.ts';
1+
import { DnsRecord } from '../record/dns_record.ts';
22
import timestamp from './generator/timestamp.ts';
33

4-
export default function recordUpdated(record : DNSRecord) : void {
4+
export default function recordUpdated(record : DnsRecord) : void {
55
console.group(`[${timestamp()}] Record Updated`)
66
console.info(`Type: \t${record.type}`)
77
console.info(`Content: \t${record.content}`)

src/record/dns_record.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { DNSRecordType } from './dns_record_type.ts';
1+
import { DnsRecordType } from './dns_record_type.ts';
22

33
/**
44
* This interface represents a record.
55
*/
6-
export interface DNSRecord {
6+
export interface DnsRecord {
77
/** Record type. */
8-
type : DNSRecordType,
8+
type : DnsRecordType,
99
/**
1010
* `A` - A valid IPv4 address.\
1111
* `AAAA` - A valid IPv6 address.\

src/record/dns_record_type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ export default supportedDnsRecordTypes;
1111
/**
1212
* This type represents all allowed records to use.
1313
*/
14-
export type DNSRecordType = ValuesFromArray<typeof supportedDnsRecordTypes>;
14+
export type DnsRecordType = ValuesFromArray<typeof supportedDnsRecordTypes>;

src/request/url/interface/update_request_url_parameters.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {DNSRecord} from '../../../record/dns_record.ts';
1+
import {DnsRecord} from '../../../record/dns_record.ts';
22

33
/**
44
* This interface represents all URL parameters from the request.
@@ -9,5 +9,5 @@ export interface RequestURLParameters {
99
/** Zone ID to get records from. */
1010
zoneId : string
1111
/** List of records to update */
12-
records : DNSRecord[]
12+
records : DnsRecord[]
1313
}

src/request/url/parser/get_records.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {DNSRecord} from '../../../record/dns_record.ts';
1+
import {DnsRecord} from '../../../record/dns_record.ts';
22
import MissingURLParameterKeyError from '../error/missing_url_parameter_key_error.ts';
33
import MissingURLParameterValueError from '../error/missing_url_parameter_value_error.ts';
44

@@ -12,11 +12,11 @@ import MissingURLParameterValueError from '../error/missing_url_parameter_value_
1212
* @throws MissingURLParameterValueError If value is an empty array
1313
* @returns The list of records
1414
*/
15-
export default function getRecords(url : URL) : DNSRecord[] {
15+
export default function getRecords(url : URL) : DnsRecord[] {
1616
const key = 'records'
1717
const recordsExist = url.searchParams.has(key);
1818
const records = url.searchParams.getAll(key);
19-
const recordsList : DNSRecord[] = []
19+
const recordsList : DnsRecord[] = []
2020

2121
if (recordsExist) {
2222
throw new MissingURLParameterKeyError(key)
@@ -27,7 +27,7 @@ export default function getRecords(url : URL) : DNSRecord[] {
2727
}
2828

2929
records.forEach((recordValue, recordIndex) => {
30-
const record = JSON.parse(recordValue) as Partial<DNSRecord>
30+
const record = JSON.parse(recordValue) as Partial<DnsRecord>
3131

3232
if (!record.type) {
3333
throw new MissingURLParameterValueError(`${key}[${recordIndex}].type`)

0 commit comments

Comments
 (0)