mirror of
https://github.com/QuotifyTeam/QuotifyBE.git
synced 2025-12-16 19:20:06 +01:00
fix: revert passing password hash for jwt generation
builder in Program.cs is not aware of it, so [Authorize] decorator can't be provided data necessary to validate requests which contain JWT with password
This commit is contained in:
@@ -15,15 +15,20 @@ public class QuotesController : ControllerBase
|
||||
{
|
||||
|
||||
private readonly ApplicationDbContext _db;
|
||||
private readonly GeneralUseHelpers guhf;
|
||||
|
||||
public QuotesController(ApplicationDbContext db)
|
||||
public QuotesController(ApplicationDbContext db, GeneralUseHelpers GUHF)
|
||||
{
|
||||
_db = db;
|
||||
guhf = GUHF;
|
||||
}
|
||||
|
||||
// GET /api/v1/quotes
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> GetQuoteByRange()
|
||||
/// <summary>
|
||||
/// Get a given quote page
|
||||
/// </summary>
|
||||
[HttpGet("page/{page_no}")]
|
||||
public async Task<IActionResult> GetQuotePage(int page_no)
|
||||
{
|
||||
// TODO...
|
||||
|
||||
@@ -47,8 +52,6 @@ public class QuotesController : ControllerBase
|
||||
if (quote == null)
|
||||
return NotFound(new { status = "error", error_msg = "Quote not found" });
|
||||
|
||||
// TODO: Consider turning the quote into a DTO
|
||||
|
||||
return Ok(quote.ToQuoteShortDTO(_db));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user