fix: indentation in frontend handlers and restore dhcp auto-sync toast
This commit is contained in:
@@ -209,7 +209,12 @@ export default definePage({
|
|||||||
'on:click': async () => {
|
'on:click': async () => {
|
||||||
const res = await apiFetch('/api/dhcp/apply', { method: 'POST' });
|
const res = await apiFetch('/api/dhcp/apply', { method: 'POST' });
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
toast('dnsmasq applied', 'success');
|
const synced = res.data?.synced;
|
||||||
|
let msg = 'dnsmasq applied';
|
||||||
|
if (synced && synced.length) {
|
||||||
|
msg += ' (auto-synced: ' + synced.join(', ') + ')';
|
||||||
|
}
|
||||||
|
toast(msg, 'success');
|
||||||
modelFetch('dnsmasq');
|
modelFetch('dnsmasq');
|
||||||
} else {
|
} else {
|
||||||
toast(res.error || 'Apply failed', 'error');
|
toast(res.error || 'Apply failed', 'error');
|
||||||
|
|||||||
Reference in New Issue
Block a user