Esempio n. 1
0
        public HttpResponseMessage SignIn([FromBody] User_lst_Files user_lst_files)
        {
            if (fileservice.Valid(user_lst_files.User.username, user_lst_files.User.password))
            {
                fileservice.UpdateListFiles(user_lst_files.User.username, user_lst_files.User.password, user_lst_files.lstFiles);
                fileservice.SignIn(user_lst_files.User.username, user_lst_files.User.password);
                // add user to database ! admin service
                HttpResponseMessage message = new HttpResponseMessage();
                message.Content = new StringContent("Logging Succefully");



                return(message);
            }
            else
            {
                HttpResponseMessage message = new HttpResponseMessage();
                message.StatusCode = HttpStatusCode.BadRequest;
                message.Content    = new StringContent("BAD");


                return(message);
            }
        }