mirror of
https://git.srhtnin.garden/sarah/srhtnin.github.io.git
synced 2026-10-13 18:38:11 +02:00
Added profile page to edit your profile and see stats.
This commit is contained in:
1 parent
39a8f18fa3
commit
11b26d972e
6 files changed
+1105
-6
No files matched your search
@@ -145,18 +145,21 @@ async function WriteRemoteSave(SaveData) {
|
||||
}
|
||||
|
||||
|
||||
async function ReadRemoteSave() {
|
||||
async function ReadRemoteSave(
|
||||
SaveKey = GetSaveKey()
|
||||
) {
|
||||
const Response = await fetch(
|
||||
ApiUrl + "/Load.php",
|
||||
{
|
||||
method: "POST",
|
||||
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
"Content-Type":
|
||||
"application/json"
|
||||
},
|
||||
|
||||
body: JSON.stringify({
|
||||
SaveKey: GetSaveKey()
|
||||
SaveKey: SaveKey
|
||||
})
|
||||
}
|
||||
);
|
||||
@@ -168,7 +171,8 @@ async function ReadRemoteSave() {
|
||||
);
|
||||
}
|
||||
|
||||
const Result = await Response.json();
|
||||
const Result =
|
||||
await Response.json();
|
||||
|
||||
if (!Result.Success) {
|
||||
throw new Error(
|
||||
@@ -184,7 +188,6 @@ async function ReadRemoteSave() {
|
||||
return Result.SaveData;
|
||||
}
|
||||
|
||||
|
||||
async function SaveGame(SaveData) {
|
||||
SaveData.Revision++;
|
||||
SaveData.LastSavedAt = Date.now();
|
||||
|
||||
Reference in new issue
Block a user