Quote Services
continuous-integration/drone/push Build is failing Details

pull/6/head
Leni BEAULATON 3 weeks ago
parent 50fb9d8d68
commit fee5b07fac

@ -0,0 +1,112 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DTO;
using Dto2Entities;
using Entity;
using Shared;
namespace ServicesApi
{
public class QuoteService : IQuoteService<QuoteDTO>
{
private IQuoteService<Quote> quoteService;
public QuoteService(IQuoteService<Quote> quote)
{
quoteService = quote;
}
public async Task AddQuote(QuoteDTO quote)
{
await quoteService.AddQuote(quote.ToEntity());
}
public async Task<PaginationResult<QuoteDTO>> GetAllQuote()
{
throw new NotImplementedException();
}
public async Task<PaginationResult<QuoteDTO>> GetAllQuoteLang(int index, int pageSize, int lang)
{
throw new NotImplementedException();
}
public async Task<QuoteDTO> GetDailyQuote(DateOnly date, int lang)
{
return quoteService.GetDailyQuote(date, lang).Result.ToDto();
}
public async Task<PaginationResult<QuoteDTO>> GetFavorites(int index, int pageSize, int UserId)
{
throw new NotImplementedException();
}
public async Task<PaginationResult<QuoteDTO>> GetInvalidQuote(int index, int pageSize, int lang)
{
throw new NotImplementedException();
}
public async Task<PaginationResult<QuoteDTO>> GetInvalidQuote(int index, int pageSize)
{
throw new NotImplementedException();
}
public async Task<int> GetLastQuoteId()
{
return await quoteService.GetLastQuoteId();
}
public async Task<QuoteDTO> GetQuoteById(int id)
{
return quoteService.GetQuoteById(id).Result.ToDto();
}
public async Task<PaginationResult<QuoteDTO>> GetSomeQuote(int index, int pageSize)
{
throw new NotImplementedException();
}
public async Task<PaginationResult<QuoteDTO>> GetSuggestions(int index, int pageSize, int lang)
{
throw new NotImplementedException();
}
public async Task<PaginationResult<QuoteDTO>> GetValidQuote(int index, int pageSize)
{
throw new NotImplementedException();
}
public async Task RemoveQuote(int quoteId)
{
await quoteService.RemoveQuote(quoteId);
}
public async Task<PaginationResult<QuoteDTO>> SearchByCharacter(string character, int index, int pageSize, int lang)
{
throw new NotImplementedException();
}
public async Task<PaginationResult<QuoteDTO>> SearchByContent(string content, int index, int pageSize, int lang)
{
throw new NotImplementedException();
}
public async Task<PaginationResult<QuoteDTO>> SearchBySource(string source, int index, int pageSize, int lang)
{
throw new NotImplementedException();
}
public async Task UpdateQuote(int quoteId, QuoteDTO quote)
{
await quoteService.UpdateQuote(quoteId, quote.ToEntity());
}
public async Task ValidateQuote(int quoteId, bool isValidate)
{
await quoteService.ValidateQuote(quoteId, isValidate);
}
}
}

@ -87,8 +87,7 @@ namespace ServicesApi
public async Task<UserDTO> UpdateUser(int userId, UserDTO user) public async Task<UserDTO> UpdateUser(int userId, UserDTO user)
{ {
await userService.UpdateUser(userId, user.ToEntity()); return userService.UpdateUser(userId, user.ToEntity()).Result.ToDto();
throw new NotImplementedException();
} }
} }
} }

Loading…
Cancel
Save