Little update around the controllers

This commit is contained in:
Sébastien André
2020-03-21 16:43:56 +01:00
parent c15ad54823
commit c85b036b7e
12 changed files with 24 additions and 29 deletions

View File

@@ -1,11 +1,13 @@
using skydiveLogs_api.Business.Interface;
using skydiveLogs_api.Model;
using skydiveLogs_api.Data.Interface;
using System.Security.Cryptography;
using System.Security.Cryptography;
using System.Text;
using System.IO;
using System;
using skydiveLogs_api.Business.Interface;
using skydiveLogs_api.Model;
using skydiveLogs_api.Data.Interface;
namespace skydiveLogs_api.Business
{
public class UserService : IUserService
@@ -15,11 +17,14 @@ namespace skydiveLogs_api.Business
_userRepository = userRepository;
}
public User GetById(int userId)
{
return _userRepository.GetById(userId);
}
public User GetByLogin(string login, string password)
{
var tmp = _userRepository.GetByLogin(login, EncryptPassword(password));
return tmp;
return _userRepository.GetByLogin(login, EncryptPassword(password));
}
public void AddNewUser(User newUser)