Exemplo n.º 1
0
        public async Task <string> AdminSignUp(string username, string password, string phone)
        {
            if (username == null)
            {
                return("username cannot be null");
            }
            if (await usersDAL.AddDataUser(new RegisteredAdmin(username, EncryptString(key, password), phone)))
            {
                await usersDAL.AddNewAdminState(username, EncryptString(key, password), phone);

                await usersDAL.AddNewShoppingCart(username);

                return("success");
            }

            return("username: "******" is already taken please choose a different one");
        }