Skip to content

Commit 6b1d376

Browse files
committed
Refactor audit logs action handling for app updates
- Moved the action handling for app updates to a new position in the pathPatterns array for better organization. - Ensured that the logic for handling PUT and DELETE methods for app updates is preserved and correctly implemented.
1 parent 2227969 commit 6b1d376

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/pages/audit-logs.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,6 @@ const pathPatterns: Array<{
5858
pattern: RegExp;
5959
getAction: (method: string) => string;
6060
}> = [
61-
{
62-
pattern: /^\/app\/\d+$/,
63-
getAction: (method) => {
64-
if (method === 'PUT') return '更新应用';
65-
if (method === 'DELETE') return '删除应用';
66-
return '';
67-
},
68-
},
6961
{
7062
pattern: /^\/app\/\d+\/package\/\d+$/,
7163
getAction: (method) => {
@@ -91,6 +83,14 @@ const pathPatterns: Array<{
9183
pattern: /^\/app\/\d+\/binding\/\d+$/,
9284
getAction: () => '删除绑定',
9385
},
86+
{
87+
pattern: /^\/app\/\d+$/,
88+
getAction: (method) => {
89+
if (method === 'PUT') return '更新应用';
90+
if (method === 'DELETE') return '删除应用';
91+
return '';
92+
},
93+
},
9494
];
9595

9696
// 获取操作语义描述

0 commit comments

Comments
 (0)