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:
David Négrier
2022-04-13 11:24:15 +02:00
parent 7968c4ad7b
commit 952a5bd87c
6 changed files with 81 additions and 42 deletions
+26
View File
@@ -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();