-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from Tohirjon-Odilov/samurai/update-source
Samurai/update source
- Loading branch information
Showing
27 changed files
with
577 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 33 additions & 4 deletions
37
Exam.StockManagement.API/Controllers/Identity/AuthController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,12 @@ | |
"ValidIssuer": "127.0.0.1", | ||
"Secret": "TohirjonOdilovImtihonUchunTayyorlaganSecretKey03.02.2024", | ||
"ExpireDate": "1000" | ||
}, | ||
"EmailSettings": { | ||
"MailServer": "smtp.gmail.com", | ||
"MailPort": 587, | ||
"SenderName": "Najot Ta'lim", | ||
"Sender": "[email protected]", | ||
"Password": "wcyz cueo vuiv tcku" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
9430 |
4 changes: 4 additions & 0 deletions
4
Exam.StockManagement.Application/Abstractions/IServices/IAuthService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
using Exam.StockManagement.Domain.Entities.DTOs; | ||
using Exam.StockManagement.Domain.Entities.Models; | ||
|
||
namespace Exam.StockManagement.Application.Abstractions.IServices | ||
{ | ||
public interface IAuthService | ||
{ | ||
public Task<ResponseLogin> GenerateToken(RequestLogin user); | ||
public Task<bool> UserExist(RequestLogin user); | ||
public Task<string> CorrectEmail(RegisterLogin user); | ||
public Task<User> RegisterUser(RequestSignUp signUp); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Exam.StockManagement.Application/Abstractions/IServices/IProductService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,24 @@ | ||
using Exam.StockManagement.Domain.Entities.DTOs; | ||
using Exam.StockManagement.Domain.Entities.Models; | ||
using Exam.StockManagement.Domain.Entities.ViewModels; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Linq.Expressions; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Exam.StockManagement.Application.Abstractions.IServices | ||
{ | ||
public interface IProductService | ||
{ | ||
public Task<Product> Create(ProductDTO userDTO); | ||
public Task<Product> GetByName(string name); | ||
public Task<Product> GetById(int Id); | ||
public Task<Product> GetByEmail(string email); | ||
public Task<Product> GetByLogin(string email); | ||
public Task<IEnumerable<ProductViewModel>> GetAll(); | ||
public Task<bool> Delete(Expression<Func<Product, bool>> expression); | ||
public Task<Product> Update(int Id, ProductDTO userDTO); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ public class RequestLogin | |
public string Login { get; set; } | ||
public string Password { get; set; } | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Exam.StockManagement.Domain/Entities/DTOs/RequestSignUp.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Exam.StockManagement.Domain.Entities.DTOs | ||
{ | ||
public class RequestSignUp | ||
{ | ||
public string? Name { get; set; } | ||
public string? Email { get; set; } | ||
public string Login { get; set; } | ||
public string Password { get; set; } | ||
public string ConfirmPassword { get; set; } | ||
public string Role { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace Exam.StockManagement.Domain.Exceptions | ||
{ | ||
public class NotFoundException() : Exception("Not Found"); | ||
public class NotFoundException() : Exception("Not found") { } | ||
} |
7 changes: 7 additions & 0 deletions
7
Exam.StockManagement.Domain/Exceptions/PasswordNotMatchException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Exam.StockManagement.Domain.Exceptions | ||
{ | ||
public class PasswordNotMatchException : Exception | ||
{ | ||
public PasswordNotMatchException() : base("Password not match") { } | ||
} | ||
} |
Oops, something went wrong.