diff --git a/src/Gateway/Services/FileStorageService.cs b/src/Gateway/Services/FileStorageService.cs index f2f3b69..307af7d 100644 --- a/src/Gateway/Services/FileStorageService.cs +++ b/src/Gateway/Services/FileStorageService.cs @@ -25,8 +25,8 @@ public static class FileStorageExtension { public static void MapFileStorage(this IEndpointRouteBuilder app) { - app.MapPost("/api/gateway/file-storage", async (HttpContext context) => - await FileStorageService.UploadAsync(context)) + app.MapPost("/api/gateway/file-storage", + async (HttpContext context) => { return await FileStorageService.UploadAsync(context); }) .RequireAuthorization(); } } \ No newline at end of file diff --git a/web/src/components/Certificate-Gateway.tsx b/web/src/components/Certificate-Gateway.tsx index 0475bf6..2bc7287 100644 --- a/web/src/components/Certificate-Gateway.tsx +++ b/web/src/components/Certificate-Gateway.tsx @@ -42,78 +42,81 @@ export default function CertificateGateway({ activeKey }: IProps) { }) } - return ( - <> - -
- 证书管理 -
- + return ( + <> + +
+ 证书管理
- } - bordered - style={{ - height: 'calc(100vh - 280px)', - overflow: 'auto', - padding: '10px', - }} - dataSource={data} - renderItem={(item: CertificateEntity, index) => - <> -
-
-
-
-
- 证书名称:{item.name} -
-
- 证书描述:{item.description} -
+ +
+ } + bordered + style={{ + height: 'calc(100vh - 280px)', + overflow: 'auto', + padding: '10px', + }} + dataSource={data} + renderItem={(item: CertificateEntity, index) => + <> +
+
+
+
+
+ 证书名称:{item.name}
-
-
- 证书私钥:{item.password} -
-
- 上传时间:{item.createTime} -
+
+ 证书描述:{item.description}
-
-
- 域名:{item.host} -
-
- 过期时间:{item.expirationTime} -
+
+
+
+ 证书私钥:{item.password} +
+
+ 上传时间:{item.createTime} +
+
+
+
+ 域名:{item.host} +
+
+ 过期时间:{item.expirationTime}
-
- - -
- } - /> - setCreateCertificateVisible(false)} onSusccess={() => { - setCreateCertificateVisible(false); - loadingCertificate(); - }} /> - setUpdateCertificateVisible(false)} onSusccess={() => { - setUpdateCertificateVisible(false); - loadingCertificate(); - setUpdateCertificate({} as CertificateEntity); - }} /> - - ) - } \ No newline at end of file +
+ + +
+
+ } + /> + setCreateCertificateVisible(false)} onSusccess={() => { + setCreateCertificateVisible(false); + loadingCertificate(); + }} /> + setUpdateCertificateVisible(false)} onSusccess={() => { + setUpdateCertificateVisible(false); + loadingCertificate(); + setUpdateCertificate({} as CertificateEntity); + }} /> + + ) +} \ No newline at end of file diff --git a/web/src/components/Create-Certificate.tsx b/web/src/components/Create-Certificate.tsx index 316e07c..a0d7a16 100644 --- a/web/src/components/Create-Certificate.tsx +++ b/web/src/components/Create-Certificate.tsx @@ -11,7 +11,7 @@ interface IProps { onSusccess: () => void; } -const { Input, DatePicker } = Form; +const { Input, DatePicker } = Form; export default function CreateCertificate({ visible, onCancel, onSusccess }: IProps) { const [file, setFile] = useState({} as File);