Browse Source

Lint fix

pull/937/head
Sergei Birukov 2 years ago
parent
commit
884e967b44
  1. 12
      src/lib/Server.js

12
src/lib/Server.js

@ -111,7 +111,8 @@ module.exports = class Server {
requiresPassword,
authenticated,
};
}))
}),
)
.post('/api/session', defineEventHandler(async (event) => {
const { password } = await readBody(event);
@ -137,8 +138,7 @@ module.exports = class Server {
debug(`New Session: ${event.node.req.session.id}`);
return { success: true };
})
);
}));
// WireGuard
app.use(
@ -280,11 +280,11 @@ module.exports = class Server {
setHeader(
event,
'Content-Disposition',
'attachment; filename="wg0.json"'
'attachment; filename="wg0.json"',
);
setHeader(event, 'Content-Type', 'text/json');
return config;
})
}),
)
.put(
'/api/wireguard/restore',
@ -292,7 +292,7 @@ module.exports = class Server {
const { file } = await readBody(event);
await WireGuard.restoreConfiguration(file);
return { success: true };
})
}),
);
// Static assets

Loading…
Cancel
Save