This commit is contained in:
+9
-3
@@ -93,9 +93,15 @@ const API = {
|
||||
return this.request(`/api/projects/${projectId}/configs/${configId}`, { method: "DELETE" });
|
||||
},
|
||||
|
||||
getAudit(projectId, key) {
|
||||
const qs = key ? `?key=${encodeURIComponent(key)}` : "";
|
||||
return this.request(`/api/projects/${projectId}/configs/audit${qs}`);
|
||||
getAudit(projectId, filters = {}) {
|
||||
const qs = new URLSearchParams();
|
||||
for (const k of ["key", "action", "start", "end", "page", "pageSize"]) {
|
||||
if (filters[k] !== undefined && filters[k] !== null && filters[k] !== "") {
|
||||
qs.append(k, filters[k]);
|
||||
}
|
||||
}
|
||||
const str = qs.toString();
|
||||
return this.request(`/api/projects/${projectId}/configs/audit${str ? "?" + str : ""}`);
|
||||
},
|
||||
|
||||
// ========== 模式 ==========
|
||||
|
||||
Reference in New Issue
Block a user