Little update around the controllers
This commit is contained in:
@@ -6,6 +6,8 @@ namespace skydiveLogs_api.Business.Interface
|
||||
{
|
||||
User GetByLogin(string login, string password);
|
||||
|
||||
User GetById(int userId);
|
||||
|
||||
void AddNewUser(User user);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user