Skip to main content

CommunityAppLogClient

CommunityAppLogClient: object

Type declaration

create()

Parameters

ParameterType
requestCommunityAppLogCreateRequest

Returns

Promise<CommunityAppLogCreateResponse>

Example

import {
CommunityAppLogType,
CommunityAppLogCreateRequest,
CommunityAppLogCreateResponse,
UnknownGuid,
rootServer,
} from "@rootsdk/server-app";

export async function createExample(
communityAppLogType: CommunityAppLogType,
message: string
): Promise<CommunityAppLogCreateResponse> {
try {
// Set up the request
const request: CommunityAppLogCreateRequest = {
communityAppLogType: communityAppLogType,
message: message
};

// Call the API
const result: CommunityAppLogCreateResponse =
await rootServer.dataStore.logs.community.create(request);

return result;
} catch (error) {
// Detect error
throw error;
}
}