upd Authentification

This commit is contained in:
Daria
2021-10-20 06:09:18 +03:00
parent eab3081ec2
commit 72069508d2
24 changed files with 457 additions and 191 deletions

View File

@@ -40,6 +40,16 @@ namespace SvetoforVKBot.Models.Dop
getGender.Execute(update, client, db);
return;
case "Подписчик - Регистрация - Авторизация":
GetLoginCommand getLogin = new GetLoginCommand();
getLogin.Execute(update, client, db);
return;
case "Подписчик - Регистрация - Код":
GetPincodeCommand getPincode = new GetPincodeCommand();
getPincode.Execute(update, client, db);
return;
case "Регистрация - Корпус":
GetKorpusCommand getKorpus = new GetKorpusCommand();
getKorpus.Execute(update, client, db);

View File

@@ -28,16 +28,16 @@ namespace SvetoforVKBot.Models.Dop
var checkUser = db.Users.FirstOrDefault(u => u.chatId == chatId);
if(checkUser!=null)
{
checkUser.firstName = firstName;
checkUser.lastName = lastName;
//checkUser.firstName = firstName;
//checkUser.lastName = lastName;
}
else
{
db.Users.Add(new Data.Users()
{
chatId = chatId,
firstName = firstName,
lastName = lastName,
//firstName = firstName,
//lastName = lastName,
sourse = JsonConvert.SerializeObject(new Sourses()
{
sourses = new List<Sourse>() { new Sourse() { name = "main", dateTime = DateTime.Now } }