コード例 #1
0
        public ActionResult <List <Interest> > getInterests()
        {
            var ipAddress = HttpContext.Connection.RemoteIpAddress;

            communication.log($"", MethodBase.GetCurrentMethod().Name, ipAddress.ToString());

            DbSelect select = new DbSelect(Configuration, _hostingEnvironment);

            return(select.getInterests());
        }
コード例 #2
0
        public ActionResult <ResponseStruct <Statistics> > GetStatistics(string userToken, string requestToken)
        {
            var ipAddress = HttpContext.Connection.RemoteIpAddress;

            communication.log($"userToken = {userToken}\requestToken ->{requestToken}", MethodBase.GetCurrentMethod().Name, ipAddress.ToString());


            DbSelect select = new DbSelect(Configuration, _hostingEnvironment);

            return(select.GetStatistics(userToken, requestToken));
        }
コード例 #3
0
        public ActionResult <List <Advertisement> > about(long advertID)
        {
            var ipAddress = HttpContext.Connection.RemoteIpAddress;

            communication.log($"adverID -> {advertID}", MethodBase.GetCurrentMethod().Name, ipAddress.ToString());


            DbSelect select = new DbSelect(Configuration, _hostingEnvironment);

            return(select.getAdvertById(advertID));
        }
コード例 #4
0
        public ActionResult <ResponseStruct <SignInStruct> > Login(long phone, string pass, int platformID = 2)
        {
            var ipAddress = HttpContext.Connection.RemoteIpAddress;

            communication.log($"phone = {phone}\n pass ->{pass} \n platformID ->{platformID}", MethodBase.GetCurrentMethod().Name, ipAddress.ToString());



            DbSelect select = new DbSelect(Configuration, _hostingEnvironment);

            return(select.LogIn(phone, pass, platformID));
        }
コード例 #5
0
        public ActionResult <List <Profession> > getProfessions()
        {
            var ipAddress = HttpContext.Connection.RemoteIpAddress;

            communication.log($"", MethodBase.GetCurrentMethod().Name, ipAddress.ToString());
            List <Profession> professions = new List <Profession>();
            DbSelect          select      = new DbSelect(Configuration, _hostingEnvironment);

            professions = select.getProfessions();

            return(professions);
        }
コード例 #6
0
        public ActionResult <List <City> > getCities(long countryId)
        {
            var ipAddress = HttpContext.Connection.RemoteIpAddress;

            communication.log($"countryID -> {countryId}", MethodBase.GetCurrentMethod().Name, ipAddress.ToString());
            List <City> cities = new List <City>();
            DbSelect    select = new DbSelect(Configuration, _hostingEnvironment);

            cities = select.GetCities(countryId);

            return(cities);
        }
コード例 #7
0
        public Status VerifyOtp(long phone = 0, int otp = 0)
        {
            var ipAddress = HttpContext.Connection.RemoteIpAddress;

            communication.log($"phone = {phone}\nOTP = {otp}", MethodBase.GetCurrentMethod().Name, ipAddress.ToString());


            DbSelect select = new DbSelect(Configuration, _hostingEnvironment);



            return(select.verifyOtp(phone, otp));
        }
コード例 #8
0
        public Status ConfirmCode(string otp, string mail)
        {
            var ipAddress = HttpContext.Connection.RemoteIpAddress;

            communication.log($"code -> {otp}\n mail-> {mail}", MethodBase.GetCurrentMethod().Name, ipAddress.ToString());
            Status status;



            DbSelect select = new DbSelect(Configuration, _hostingEnvironment);

            status = select.VerifyMailOtp(otp, mail);

            return(status);
        }
コード例 #9
0
        public ActionResult <List <AgeRangeStruct> > AgeRange()
        {
            var ipAddress = HttpContext.Connection.RemoteIpAddress;

            communication.log($"", MethodBase.GetCurrentMethod().Name, ipAddress.ToString());
            List <AgeRangeStruct> ageRangeList = new List <AgeRangeStruct>();

            try
            {
                DbSelect select = new DbSelect(Configuration, _hostingEnvironment);
                ageRangeList = select.ageRange();
                return(ageRangeList);
            }
            catch
            {
                return(ageRangeList);
            }
        }