mirror of
https://github.com/logto-io/logto.git
synced 2025-02-17 22:04:19 -05:00
refactor(cli): remove default case
This commit is contained in:
parent
682c88aac8
commit
cf2c546f5d
1 changed files with 2 additions and 4 deletions
|
@ -137,15 +137,13 @@ const rotateConfig: CommandModule<unknown, { key: string }> = {
|
|||
const parsed = logtoConfigGuards[key].safeParse(rows[0]?.value);
|
||||
const original = parsed.success ? parsed.data : [];
|
||||
|
||||
// No need for default. It's already exhaustive
|
||||
// eslint-disable-next-line default-case
|
||||
switch (key) {
|
||||
case LogtoOidcConfigKey.PrivateKeys:
|
||||
return [await generateOidcPrivateKey(), ...original];
|
||||
case LogtoOidcConfigKey.CookieKeys:
|
||||
return [generateOidcCookieKey(), ...original];
|
||||
default:
|
||||
log.warn('No proper handler found, use empty array');
|
||||
|
||||
return [];
|
||||
}
|
||||
};
|
||||
const rotated = await getValue();
|
||||
|
|
Loading…
Add table
Reference in a new issue