Skip to content

Commit 58361d0

Browse files
committed
Add objectId to getLogEntries
1 parent 66f1f3f commit 58361d0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/Logging/Logging.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ export const getUserLogPropertyName = (prefix: string, signedIp: string | null =
4343
return propertyName;
4444
};
4545

46-
export const getUserLogEntries = async (prefix: string, limit = 10, objectName = OBN.LOGS, signedIp: string | undefined = undefined) => {
46+
export const getUserLogEntries = async (prefix: string, limit = 10, objectName = OBN.LOGS, signedIp: string | undefined = undefined, objectId?: string) => {
4747
const propertyName = getUserLogPropertyName(prefix, signedIp);
48-
return getLogEntries(propertyName, limit, objectName);
48+
return getLogEntries(propertyName, limit, objectName, objectId);
4949
};
5050

51-
export const getLogEntries = async (prefix: string, limit: number | null = 10, objectName = OBN.LOGS) => {
51+
export const getLogEntries = async (prefix: string, limit: number | null = 10, objectName = OBN.LOGS, objectId?: string) => {
5252
const { state } = apiker.requestParams;
5353
const payload = {
5454
prefix,
@@ -59,7 +59,7 @@ export const getLogEntries = async (prefix: string, limit: number | null = 10, o
5959
if(limit){
6060
payload.limit = limit;
6161
}
62-
const entries = await state(objectName).list(payload);
62+
const entries = await state(objectName, objectId).list(payload);
6363
return Object.values(entries) as LogObject[];
6464
};
6565

0 commit comments

Comments
 (0)