Back
This commit is contained in:
@@ -10,6 +10,12 @@ updateFavorites();
|
|||||||
updatePaydirt();
|
updatePaydirt();
|
||||||
updateOffense();
|
updateOffense();
|
||||||
|
|
||||||
|
window.addEventListener("pageshow", e => {
|
||||||
|
if (e.persisted) {
|
||||||
|
updateFavorites();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
async function updateOffense() {
|
async function updateOffense() {
|
||||||
if (!verifyLogin()) return;
|
if (!verifyLogin()) return;
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a href="#" onclick="if (history.length > 1) history.back(); else if (document.referrer) window.location.href = document.referrer; else window.location.href = '#';">Return to Player Search</a>
|
<a href="#" onclick="if (history.length > 1) history.back(); else if (document.referrer) window.location.href = document.referrer; else window.location.href = '#';">Back</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="module" src="/player.js"></script>
|
<script type="module" src="/player.js"></script>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ watchButton.onclick = async e => {
|
|||||||
|
|
||||||
const [, , id] = window.location.pathname.split("/");
|
const [, , id] = window.location.pathname.split("/");
|
||||||
const resultObject = await postData("/toggleWatched", { id: id }, token);
|
const resultObject = await postData("/toggleWatched", { id: id }, token);
|
||||||
alert(resultObject.message);
|
//alert(resultObject.message);
|
||||||
updateIsWatched();
|
updateIsWatched();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ app.post("/getHighestOffense", authenticate, async (req, res) => {
|
|||||||
const result = await pool.request()
|
const result = await pool.request()
|
||||||
.input("amount", sql.Int, amount)
|
.input("amount", sql.Int, amount)
|
||||||
.query(`
|
.query(`
|
||||||
SELECT TOP (@amount) Player.[Position], Player.PlayerName, Player.Team,
|
SELECT TOP (@amount) Player.PlayerID, Player.[Position], Player.PlayerName, Player.Team,
|
||||||
SUM(total_yards) AS TotalYards,
|
SUM(total_yards) AS TotalYards,
|
||||||
SUM(passing_yards) AS PassingYards,
|
SUM(passing_yards) AS PassingYards,
|
||||||
SUM(rushing_yards) AS RushingYards,
|
SUM(rushing_yards) AS RushingYards,
|
||||||
@@ -256,7 +256,7 @@ app.post("/getHighestPaydirt", authenticate, async (req, res) => {
|
|||||||
const result = await pool.request()
|
const result = await pool.request()
|
||||||
.input("amount", sql.Int, amount)
|
.input("amount", sql.Int, amount)
|
||||||
.query(`
|
.query(`
|
||||||
SELECT TOP (@amount) Player.[Position], Player.PlayerName, Player.Team,
|
SELECT TOP (@amount) Player.PlayerID, Player.[Position], Player.PlayerName, Player.Team,
|
||||||
SUM(total_yards) AS TotalYards,
|
SUM(total_yards) AS TotalYards,
|
||||||
SUM(passing_yards) AS PassingYards,
|
SUM(passing_yards) AS PassingYards,
|
||||||
SUM(rushing_yards) AS RushingYards,
|
SUM(rushing_yards) AS RushingYards,
|
||||||
|
|||||||
Reference in New Issue
Block a user