mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-21 15:56:24 +08:00
saving not signed in result with new system
This commit is contained in:
parent
0b12fda816
commit
2240ae7354
|
@ -219,18 +219,17 @@ async function signUp() {
|
|||
});
|
||||
if (TestLogic.notSignedInLastResult !== null) {
|
||||
TestLogic.setNotSignedInUid(createdAuthUser.user.uid);
|
||||
//TODO: use new system
|
||||
// axiosInstance
|
||||
// .post("/testCompleted", {
|
||||
// obj: TestLogic.notSignedInLastResult,
|
||||
// })
|
||||
// .then(() => {
|
||||
// DB.getSnapshot().results.push(
|
||||
// TestLogic.notSignedInLastResult
|
||||
// );
|
||||
// });
|
||||
axiosInstance
|
||||
.post("/results/add", {
|
||||
result: TestLogic.notSignedInLastResult,
|
||||
})
|
||||
.then((result) => {
|
||||
if (result.status === 200) {
|
||||
DB.getSnapshot().results.push(TestLogic.notSignedInLastResult);
|
||||
}
|
||||
});
|
||||
UI.changePage("account");
|
||||
}
|
||||
UI.changePage("account");
|
||||
} catch (e) {
|
||||
//make sure to do clean up here
|
||||
await createdAuthUser.user.delete();
|
||||
|
|
Loading…
Reference in a new issue