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 () => {
|
||||
const res = await apiFetch('/api/dhcp/apply', { method: 'POST' });
|
||||
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');
|
||||
} else {
|
||||
toast(res.error || 'Apply failed', 'error');
|
||||
|
||||
Reference in New Issue
Block a user