Files
partey_workadventure/pusher/src/Services/LocalAdmin.ts
T
David Négrier 952a5bd87c Making a round of improvement to log messages
Also, bootstraping a new LocalAdmin service to mock the AdminApi in the pusher
2022-04-13 15:07:03 +02:00

27 lines
738 B
TypeScript

import { FetchMemberDataByUuidResponse } from "./AdminApi";
import { AdminInterface } from "./AdminInterface";
/**
* A local class mocking a real admin if no admin is configured.
*/
class LocalAdmin implements AdminInterface {
fetchMemberDataByUuid(
userIdentifier: string,
playUri: string,
ipAddress: string,
characterLayers: string[]
): Promise<FetchMemberDataByUuidResponse> {
return Promise.resolve({
email: userIdentifier,
userUuid: userIdentifier,
tags: [],
messages: [],
visitCardUrl: null,
textures: [],
userRoomToken: undefined,
});
}
}
export const localAdmin = new LocalAdmin();