From 66eb2a06c328f415c289394df15bf9f7a195c551 Mon Sep 17 00:00:00 2001 From: esuo1198 <54134.es@gmail.com> Date: Fri, 17 Nov 2023 16:49:19 +0900 Subject: [PATCH] Fix error that occurred when creating a new card --- .../Controllers/Game/MyDonEntryController.cs | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/TaikoLocalServer/Controllers/Game/MyDonEntryController.cs b/TaikoLocalServer/Controllers/Game/MyDonEntryController.cs index 9c229ac..7dcc839 100644 --- a/TaikoLocalServer/Controllers/Game/MyDonEntryController.cs +++ b/TaikoLocalServer/Controllers/Game/MyDonEntryController.cs @@ -26,18 +26,6 @@ public class MyDonEntryController : BaseController Logger.LogInformation("MyDonEntry request : {Request}", request.Stringify()); var newId = cardService.GetNextBaid(); - await cardService.AddCard(new Card - { - AccessCode = request.WechatQrStr, - Baid = newId - }); - - await credentialService.AddCredential(new Credential - { - Baid = newId, - Password = "", - Salt = "" - }); var newUser = new UserDatum { @@ -58,9 +46,21 @@ public class MyDonEntryController : BaseController TokenCountDict = "{}", UnlockedSongIdList = "[]" }; - await userDatumService.InsertUserDatum(newUser); + await cardService.AddCard(new Card + { + AccessCode = request.WechatQrStr, + Baid = newId + }); + + await credentialService.AddCredential(new Credential + { + Baid = newId, + Password = "", + Salt = "" + }); + var response = new MydonEntryResponse { Result = 1,