[FEATURE] Storage adjustments and minor tweaks (#9)
Co-authored-by: Dunemask <dunemask@gmail.com> Reviewed-on: https://gitea.dunemask.dev/elysium/minecluster/pulls/9
This commit is contained in:
parent
3d73f69678
commit
43c4409498
13 changed files with 121 additions and 39 deletions
|
@ -15,8 +15,14 @@ const dnsRegex = new RegExp(
|
|||
|
||||
function backupPayloadFilter(req, res) {
|
||||
const serverSpec = req.body;
|
||||
const { backupHost, backupBucket, backupId, backupKey, backupInterval } =
|
||||
serverSpec;
|
||||
const {
|
||||
storage,
|
||||
backupHost,
|
||||
backupBucket,
|
||||
backupId,
|
||||
backupKey,
|
||||
backupInterval,
|
||||
} = serverSpec;
|
||||
// TODO: Impliment non creation time backups
|
||||
if (
|
||||
!!backupHost ||
|
||||
|
@ -25,6 +31,8 @@ function backupPayloadFilter(req, res) {
|
|||
!!backupKey ||
|
||||
!!backupInterval
|
||||
) {
|
||||
if (storage === 0)
|
||||
return res.status(400).send("Backups cannot be used if storage is zero!");
|
||||
// If any keys are required, all are required
|
||||
if (
|
||||
!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue