Making a round of improvement to log messages
Also, bootstraping a new LocalAdmin service to mock the AdminApi in the pusher
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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();
|
||||
Reference in New Issue
Block a user