Просмотр исходного кода

Fix lint errors: remove unused React import and apply biome formatting

Co-authored-by: yuki-takei <1638767+yuki-takei@users.noreply.github.com>
copilot-swe-agent[bot] 3 месяцев назад
Родитель
Сommit
a54af2eeda

+ 1 - 1
apps/app/src/client/components/Admin/App/MailSetting.tsx

@@ -1,4 +1,4 @@
-import React, { useCallback, useEffect } from 'react';
+import { useCallback, useEffect } from 'react';
 import { useTranslation } from 'next-i18next';
 import { useForm } from 'react-hook-form';
 

+ 3 - 1
apps/app/src/server/service/config-manager/config-definition.ts

@@ -924,7 +924,9 @@ export const CONFIG_DEFINITIONS = {
   'mail:from': defineConfig<string | undefined>({
     defaultValue: undefined,
   }),
-  'mail:transmissionMethod': defineConfig<'smtp' | 'ses' | 'oauth2' | undefined>({
+  'mail:transmissionMethod': defineConfig<
+    'smtp' | 'ses' | 'oauth2' | undefined
+  >({
     defaultValue: undefined,
   }),
   'mail:smtpHost': defineConfig<string | undefined>({

+ 6 - 1
apps/app/src/server/service/mail.ts

@@ -194,7 +194,12 @@ class MailService implements S2sMessageHandlable {
       const refreshToken = configManager.getConfig('mail:oauth2RefreshToken');
       const user = configManager.getConfig('mail:oauth2User');
 
-      if (clientId == null || clientSecret == null || refreshToken == null || user == null) {
+      if (
+        clientId == null ||
+        clientSecret == null ||
+        refreshToken == null ||
+        user == null
+      ) {
         return null;
       }