Fixes for the DomainDialog

This commit is contained in:
Johannes Zellner
2025-04-19 16:28:36 +02:00
parent 2a2019b363
commit 5e1e6657d1
3 changed files with 10 additions and 16 deletions
-1
View File
@@ -73,7 +73,6 @@ function appProgressMessage(app) {
function create() {
const accessToken = localStorage.token;
// TODO maybe we can share those globally
let config = null;
let profile = null;
+5 -4
View File
@@ -5,7 +5,7 @@ import { API_ORIGIN } from '../constants.js';
function create() {
const accessToken = localStorage.token;
return {
const exposed = {
async list() {
let error, result;
try {
@@ -57,10 +57,9 @@ function create() {
if (error || result.status !== 204) return [error || result];
// TODO is this still needed on update? a syncdns should also do this
// this is done so that an out-of-sync dkim key can be synced
// [error] = await domainsModel.setDnsRecords({ domain: domain, type: 'mail' });
// if (error) console.error(error); // not fatal for now
[error] = await exposed.setDnsRecords({ domain: domain, type: 'mail' });
if (error) console.error(error); // not fatal for now
return [null];
},
@@ -121,6 +120,8 @@ function create() {
return [null, result.body];
},
};
return exposed;
}
export default {