mirror of
https://github.com/unraid/api.git
synced 2026-05-06 23:20:30 -05:00
fix: ensure regTy is always uppercase
This commit is contained in:
@@ -261,7 +261,7 @@ const parse = (state: VarIni): Var => {
|
||||
portssl: toNumber(state.portssl),
|
||||
porttelnet: toNumber(state.porttelnet),
|
||||
regCheck: state.regCheck === '' ? 'Valid' : 'Error',
|
||||
regTy: ['Basic', 'Plus', 'Pro'].includes(state.regTy) ? state.regTy : 'Invalid',
|
||||
regTy: (['Basic', 'Plus', 'Pro'].includes(state.regTy) ? state.regTy : 'Invalid').toUpperCase(),
|
||||
// Make sure to use a || not a ?? as regCheck can be an empty string
|
||||
regState: (state.regCheck || state.regTy).toUpperCase(),
|
||||
safeMode: iniBooleanToJsBoolean(state.safeMode),
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// @todo: remove string and add rest of the options
|
||||
type FsType = 'xfs' | string;
|
||||
type RegistrationCheck = 'Error' | 'Valid';
|
||||
type RegistrationType = 'Invalid' | 'Basic' | 'Plus' | 'Pro' | string;
|
||||
type RegistrationType = 'INVALID' | 'BASIC' | 'PLUS' | 'PRO' | string;
|
||||
|
||||
/**
|
||||
* Global vars
|
||||
|
||||
Reference in New Issue
Block a user