Progress Overhaul + Profile Page and a LOT more! (#4262)

Co-authored-by: Amelia <77553571+Fesaa@users.noreply.github.com>
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
Joe Milazzo
2025-12-09 10:00:11 -07:00
committed by GitHub
parent 4ac13f1f25
commit 9f29fa593d
645 changed files with 25585 additions and 4805 deletions
+3 -4
View File
@@ -1,8 +1,7 @@
using System.Threading.Tasks;
using API.Data;
using API.DTOs;
using API.DTOs.Progress;
using API.Services;
using API.Services.Reading;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@@ -35,7 +34,7 @@ public class PanelsController : BaseApiController
public async Task<ActionResult> SaveProgress(ProgressDto dto, [FromQuery] string apiKey)
{
if (string.IsNullOrEmpty(apiKey)) return Unauthorized("ApiKey is required");
var userId = await _unitOfWork.UserRepository.GetUserIdByApiKeyAsync(apiKey);
var userId = await _unitOfWork.UserRepository.GetUserIdByAuthKeyAsync(apiKey);
await _readerService.SaveReadingProgress(dto, userId);
return Ok();
}
@@ -50,7 +49,7 @@ public class PanelsController : BaseApiController
public async Task<ActionResult<ProgressDto>> GetProgress(int chapterId, [FromQuery] string apiKey)
{
if (string.IsNullOrEmpty(apiKey)) return Unauthorized("ApiKey is required");
var userId = await _unitOfWork.UserRepository.GetUserIdByApiKeyAsync(apiKey);
var userId = await _unitOfWork.UserRepository.GetUserIdByAuthKeyAsync(apiKey);
var progress = await _unitOfWork.AppUserProgressRepository.GetUserProgressDtoAsync(chapterId, userId);
if (progress == null) return Ok(new ProgressDto()