chore: enable U8 clients to log in #2971
@ -109,12 +109,19 @@ const createLoginResponse = (
|
||||
const resp: ILoginResponse = {
|
||||
id: account.id,
|
||||
DisplayName: account.DisplayName,
|
||||
CountryCode: account.CountryCode,
|
||||
AmazonAuthToken: account.AmazonAuthToken,
|
||||
AmazonRefreshToken: account.AmazonRefreshToken,
|
||||
Nonce: account.Nonce,
|
||||
BuildLabel: buildLabel
|
||||
};
|
||||
if (version_compare(buildLabel, "2014.10.24.08.24") >= 0) {
|
||||
// U15 and up
|
||||
resp.CountryCode = account.CountryCode;
|
||||
} else {
|
||||
// U8
|
||||
resp.NatHash = "0";
|
||||
resp.SteamId = "0";
|
||||
}
|
||||
if (version_compare(buildLabel, "2015.02.13.10.41") >= 0) {
|
||||
resp.NRS = [config.nrsAddress ?? myAddress];
|
||||
}
|
||||
|
||||
@ -170,6 +170,7 @@ import { upgradeOperatorController } from "../controllers/api/upgradeOperatorCon
|
||||
import { upgradesController } from "../controllers/api/upgradesController.ts";
|
||||
import { valenceSwapController } from "../controllers/api/valenceSwapController.ts";
|
||||
import { wishlistController } from "../controllers/api/wishlistController.ts";
|
||||
import { worldStateController } from "../controllers/dynamic/worldStateController.ts";
|
||||
|
||||
const apiRouter = express.Router();
|
||||
|
||||
@ -235,6 +236,7 @@ apiRouter.get("/surveys.php", surveysController);
|
||||
apiRouter.get("/trading.php", tradingController);
|
||||
apiRouter.get("/updateSession.php", updateSessionGetController);
|
||||
apiRouter.get("/upgradeOperator.php", upgradeOperatorController);
|
||||
apiRouter.get("/worldState.php", worldStateController); // U8
|
||||
|
||||
// post
|
||||
apiRouter.post("/abortDojoComponent.php", abortDojoComponentController);
|
||||
|
||||
@ -55,6 +55,8 @@ export interface ILoginResponse extends IAccountAndLoginResponseCommons {
|
||||
DTLS?: number;
|
||||
IRC?: string[];
|
||||
HUB?: string;
|
||||
NatHash?: string;
|
||||
SteamId?: string;
|
||||
}
|
||||
|
||||
export interface IGroup {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user