stage 2, not completed
This commit is contained in:
parent
88b2255f8b
commit
34fb2a478b
@ -86,6 +86,7 @@ func GetDomains(domain string) ([]models.Domain, error) {
|
||||
|
||||
func UpdateDomain(d *models.Domain) error {
|
||||
tx := database.Client.Begin()
|
||||
logrus.Debug(d)
|
||||
if _, err := (domainsDAO{}).Update(tx, d); err != nil {
|
||||
tx.Rollback()
|
||||
return err
|
||||
|
@ -79,6 +79,7 @@ export default function DomainEditModal({ open, domain, editDomain, createDomain
|
||||
scrollToFirstError
|
||||
autoComplete="off"
|
||||
>
|
||||
<Form.Item<Domain> hidden name='id' />
|
||||
<Form.Item<Domain>
|
||||
label={t('domains._')}
|
||||
name='domain_name'
|
||||
|
@ -15,7 +15,7 @@ export default function DomainInfo({ domain }: Props) {
|
||||
</p>
|
||||
<p>
|
||||
<GlobalOutlined className="icon-info" />
|
||||
<span className="info">{domain.domain_name}</span>
|
||||
<span className="info">{domain.main_dns}</span>
|
||||
</p>
|
||||
</>
|
||||
)
|
||||
|
@ -226,6 +226,7 @@ export default function RecordEditModal({ open, record, onOk, onCancel, editReco
|
||||
wrapperCol={{ span: 20 }}
|
||||
validateTrigger='onBlur'
|
||||
>
|
||||
<Form.Item<Record> hidden name='id' />
|
||||
<Form.Item<Record> label={t('records.recordType')} required name='record_type'>
|
||||
<Select allowClear={false} options={recordTypeOptions} />
|
||||
</Form.Item>
|
||||
|
@ -56,6 +56,7 @@ export const useDomainStore = () => {
|
||||
}
|
||||
|
||||
async function updateDomain(domain: Domain) {
|
||||
console.log(domain)
|
||||
if (!import.meta.env.DEV) {
|
||||
await api.put("/domains", domain)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user