fix(controlplane): change history names kinds and reads only the caller's org
This commit is contained in:
1 parent
714ec99a49
commit
2501e1301c
9 files changed
+112
-33
No files matched your search
@@ -38,7 +38,7 @@ const kinds = computed(() => catalog.value.map((r) => r.kind));
|
||||
async function load(): Promise<void> {
|
||||
if (!kinds.value.length) return;
|
||||
try {
|
||||
entries.value = await store.audit("resources", kinds.value);
|
||||
entries.value = await store.audit(kinds.value);
|
||||
error.value = "";
|
||||
} catch (err) {
|
||||
error.value = String((err as Error).message || err);
|
||||
|
||||
@@ -464,9 +464,9 @@ export const useControlPlaneStore = defineStore("control-plane", () => {
|
||||
return response.revisions ?? [];
|
||||
}
|
||||
|
||||
async function audit(table: string, keys: string[]): Promise<AuditEntry[]> {
|
||||
const query = new URLSearchParams({ table });
|
||||
for (const key of keys) query.append("key", key);
|
||||
async function audit(kinds: string[]): Promise<AuditEntry[]> {
|
||||
const query = new URLSearchParams();
|
||||
for (const kind of kinds) query.append("kind", kind);
|
||||
const response = await request<{ entries?: AuditEntry[] }>(
|
||||
`/api/control-plane/audit?${query}`,
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user