fix unlock all focus schools for when logged in on an old version
All checks were successful
Build / build (pull_request) Successful in 1m42s
All checks were successful
Build / build (pull_request) Successful in 1m42s
This commit is contained in:
parent
bfce46cf83
commit
978ecf6b1e
@ -11,7 +11,7 @@ import { version_compare } from "../../helpers/inventoryHelpers.ts";
|
|||||||
export const focusController: RequestHandler = async (req, res) => {
|
export const focusController: RequestHandler = async (req, res) => {
|
||||||
const account = await getAccountForRequest(req);
|
const account = await getAccountForRequest(req);
|
||||||
|
|
||||||
let op: string | undefined;
|
let op = req.query.op as string;
|
||||||
const focus2 = account.BuildLabel && version_compare(account.BuildLabel, "2022.04.29.12.53") < 0;
|
const focus2 = account.BuildLabel && version_compare(account.BuildLabel, "2022.04.29.12.53") < 0;
|
||||||
if (focus2) {
|
if (focus2) {
|
||||||
// Focus 2.0
|
// Focus 2.0
|
||||||
|
|||||||
@ -3276,13 +3276,13 @@ function unlockFocusSchool(upgradeType) {
|
|||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
// Deselect current FocusAbility so we will be able to unlock the way for free
|
// Deselect current FocusAbility so we will be able to unlock the way for free
|
||||||
$.post({
|
$.post({
|
||||||
url: "/api/focus.php?" + window.authz + "&op=5",
|
url: "/api/focus.php?" + window.authz + "&op=ActivateWay",
|
||||||
contentType: "text/plain",
|
contentType: "text/plain",
|
||||||
data: JSON.stringify({ FocusType: null })
|
data: JSON.stringify({ FocusType: null })
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
// Unlock the way now
|
// Unlock the way now
|
||||||
$.post({
|
$.post({
|
||||||
url: "/api/focus.php?" + window.authz + "&op=2",
|
url: "/api/focus.php?" + window.authz + "&op=UnlockWay",
|
||||||
contentType: "text/plain",
|
contentType: "text/plain",
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
FocusType: upgradeType
|
FocusType: upgradeType
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user