add purchasedPlayer to RFA server data (#1103)

This commit is contained in:
Shy 2024-02-17 06:11:29 +01:00 committed by GitHub
parent 9b483bdd8a
commit aba2336093
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

@ -40,7 +40,7 @@ export interface FileServer {
server: string;
}
export type RFAServerData = Pick<BaseServer, "hostname" | "hasAdminRights">;
export type RFAServerData = Pick<BaseServer, "hostname" | "hasAdminRights" | "purchasedByPlayer">;
export function isFileData(p: unknown): p is FileData {
const pf = p as FileData;

@ -113,9 +113,10 @@ export const RFARequestHandler: Record<string, (message: RFAMessage) => void | R
},
getAllServers: function (msg: RFAMessage): RFAMessage {
const servers = GetAllServers().map(({ hostname, hasAdminRights }) => ({
const servers = GetAllServers().map(({ hostname, hasAdminRights, purchasedByPlayer }) => ({
hostname,
hasAdminRights,
purchasedByPlayer,
}));
return new RFAMessage({ result: servers, id: msg.id });