mirror of
https://github.com/1f349/admin.1f349.com.git
synced 2025-02-22 05:24:57 +00:00
Change domain name in rest queries
This commit is contained in:
parent
e2615861b0
commit
cb25cf000a
@ -16,6 +16,10 @@ export class RestTable<T extends object> implements IPromiseLike<RestTable<T>> {
|
||||
this.rows = [];
|
||||
}
|
||||
|
||||
changeUrl(apiUrl: string) {
|
||||
this.apiUrl = apiUrl;
|
||||
}
|
||||
|
||||
updateSubs() {
|
||||
this.subs.forEach(x => x(this));
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import {domainOption} from "../stores/domain-option";
|
||||
import {
|
||||
DnsTypeA,
|
||||
DnsTypeCAA,
|
||||
DnsTypeCNAME,
|
||||
DnsTypeMX,
|
||||
@ -26,7 +25,6 @@
|
||||
type CnameValue,
|
||||
type MxValue,
|
||||
type NsValue,
|
||||
type SoaValue,
|
||||
type SrvValue,
|
||||
type TxtValue,
|
||||
} from "../types/records";
|
||||
@ -51,6 +49,11 @@
|
||||
|
||||
const table = new RestTable<AnyRecord>(apiAzalea + "/domains/" + $domainOption + "/records", (item: AnyRecord) => item.name);
|
||||
|
||||
domainOption.subscribe(x => {
|
||||
table.changeUrl(apiAzalea + "/domains/" + x + "/records");
|
||||
table.reload();
|
||||
});
|
||||
|
||||
function rowOrdering<T extends AnyValue>(
|
||||
rows: RestItem<AnyRecord>[],
|
||||
domain: string,
|
||||
|
Loading…
x
Reference in New Issue
Block a user