fix ci
continuous-integration/drone/push Build is failing Details

merging_EF-API
David D'ALMEIDA 1 year ago
parent 4c21afda86
commit cc834989d5

@ -89,7 +89,7 @@ namespace Entities
/// </summary>
public bool IsCoach { get; set; }
public byte[] ProfilPicture { get; set; }
public byte[]? ProfilPicture { get; set; }

@ -10,11 +10,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Model.Manager;
using Model.Service;
using Model2Entities;
using StubAPI;
using Swashbuckle.AspNetCore.SwaggerGen;
namespace HeartTrackAPI;

@ -15,7 +15,6 @@ public class ActivityController : Controller
{
private readonly IActivityRepository _activityService;
private readonly ILogger<ActivityController> _logger;
private readonly IActivityManager _activityManager;
public ActivityController(IDataManager dataManager, ILogger<ActivityController> logger)
{
@ -39,9 +38,12 @@ public class ActivityController : Controller
}
_logger.LogInformation("Executing {Action} with parameters: {Parameters}", nameof(GetActivities), pageRequest);
var activities = await _activityService.GetActivities(pageRequest.Index, pageRequest.Count, ActivityOrderCriteria.None, pageRequest.Descending ?? false);
if(activities == null)
{
return BadRequest("No activities found");
}
var pageResponse = new PageResponse<ActivityDto>(pageRequest.Index, pageRequest.Count, totalCount, activities.Select(a => a.ToDto()));
return Ok(pageResponse);
return Ok();
}
catch (Exception e)
{

@ -29,11 +29,5 @@
<ProjectReference Include="..\Shared\Shared.csproj" />
<ProjectReference Include="..\StubAPI\StubAPI.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json" Version="13.0.1">
<HintPath>..\..\..\..\..\.nuget\packages\newtonsoft.json\13.0.1\lib\netstandard2.0\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

@ -35,7 +35,7 @@ public class SwaggerOptions: IConfigureNamedOptions<SwaggerGenOptions>
/// </summary>
/// <param name="name"></param>
/// <param name="options"></param>
public void Configure(string name, SwaggerGenOptions options)
public void Configure(string? name, SwaggerGenOptions options)
{
Configure(options);
}

@ -1,4 +1,3 @@
using Microsoft.AspNetCore.Http;
namespace Model.Manager;
public interface IActivityManager

@ -15,10 +15,4 @@
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.2" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.AspNetCore.Identity">
<HintPath>..\..\..\..\..\.dotnet\shared\Microsoft.AspNetCore.App\8.0.1\Microsoft.AspNetCore.Identity.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

@ -1,31 +0,0 @@
using Entities;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.UI.Services;
namespace Model.Service;
public class EmailSender : IEmailSender<AthleteEntity>
{
private IEmailSender<AthleteEntity> _emailSenderImplementation;
public async Task SendEmailAsync(string email, string subject, string htmlMessage)
{
throw new NotImplementedException();
}
public async Task SendConfirmationLinkAsync(AthleteEntity user, string email, string confirmationLink)
{
throw new NotImplementedException();
}
public async Task SendPasswordResetLinkAsync(AthleteEntity user, string email, string resetLink)
{
throw new NotImplementedException();
}
public async Task SendPasswordResetCodeAsync(AthleteEntity user, string email, string resetCode)
{
throw new NotImplementedException();
}
}
Loading…
Cancel
Save