Fix error that occurred when creating a new card
This commit is contained in:
parent
3fc8134d5b
commit
66eb2a06c3
@ -26,18 +26,6 @@ public class MyDonEntryController : BaseController<MyDonEntryController>
|
|||||||
Logger.LogInformation("MyDonEntry request : {Request}", request.Stringify());
|
Logger.LogInformation("MyDonEntry request : {Request}", request.Stringify());
|
||||||
|
|
||||||
var newId = cardService.GetNextBaid();
|
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
|
var newUser = new UserDatum
|
||||||
{
|
{
|
||||||
@ -58,9 +46,21 @@ public class MyDonEntryController : BaseController<MyDonEntryController>
|
|||||||
TokenCountDict = "{}",
|
TokenCountDict = "{}",
|
||||||
UnlockedSongIdList = "[]"
|
UnlockedSongIdList = "[]"
|
||||||
};
|
};
|
||||||
|
|
||||||
await userDatumService.InsertUserDatum(newUser);
|
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
|
var response = new MydonEntryResponse
|
||||||
{
|
{
|
||||||
Result = 1,
|
Result = 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user