🧹 Clean up
continuous-integration/drone/push Build is passing Details

pull/65/head
Alexis Drai 2 years ago
parent cfcab3316f
commit c108032b26

@ -4,8 +4,6 @@ using cat_cafe.Entities;
using cat_cafe.Repositories;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using Serilog;
namespace cat_cafe.Controllers
{

@ -9,9 +9,10 @@ namespace cat_cafe.Mappers
public BarMapper()
{
CreateMap<Bar, BarDto>()
.ForMember(dest => dest.CatIds, opt => opt.MapFrom(src => src.Cats.Select(c => c.Id)));
.ForMember(dest => dest.CatIds, opt => opt.MapFrom(src => src.Cats.Select(c => c.Id)));
CreateMap<BarDto, Bar>();
}
}
}

@ -2,6 +2,7 @@
using cat_cafe.Dto;
using cat_cafe.Entities;
namespace cat_cafe.Mappers
{
public class CustomerMapper : Profile

@ -1,9 +1,7 @@
using cat_cafe.Repositories;
using cat_cafe.WeSo;
using Microsoft.EntityFrameworkCore;
using Serilog;
using System.Net.WebSockets;
using Microsoft.Extensions.Logging;
var builder = WebApplication.CreateBuilder(args);
@ -12,7 +10,7 @@ List<WebSocket> _sockets = new();
// Add services to the container.
builder.Services.AddLogging(configure => configure.AddFile("log.txt"));
builder.Services.AddSingleton<List<WebSocket>>(x => _sockets);
builder.Services.AddSingleton(x => _sockets);
builder.Services.AddSingleton<WebSocketHandler>();
builder.Services.AddControllers();
builder.Services.AddDbContext<CatCafeContext>(opt => opt.UseSqlite("Data Source=cat_cafe.db"));

Loading…
Cancel
Save