Yuyuqt commited on
Commit
da200f8
·
1 Parent(s): b866d20

add: book cover fix

Browse files
Backend/Features/Books/BookService.cs CHANGED
@@ -1,6 +1,7 @@
1
  using DbConnect.Data;
2
  using DbConnect.Entities;
3
  using Microsoft.EntityFrameworkCore;
 
4
 
5
  namespace Backend.Features.Books
6
  {
@@ -166,6 +167,7 @@ namespace Backend.Features.Books
166
  public int AvailableCopies { get; set; }
167
  public DateTime CreatedAt { get; set; }
168
  public DateTime? UpdatedAt { get; set; }
 
169
  public string? CoverUrl { get; set; }
170
  public List<BookCategoryDto> Categories { get; set; } = new();
171
  }
 
1
  using DbConnect.Data;
2
  using DbConnect.Entities;
3
  using Microsoft.EntityFrameworkCore;
4
+ using System.Text.Json.Serialization;
5
 
6
  namespace Backend.Features.Books
7
  {
 
167
  public int AvailableCopies { get; set; }
168
  public DateTime CreatedAt { get; set; }
169
  public DateTime? UpdatedAt { get; set; }
170
+ [JsonPropertyName("coverUrl")]
171
  public string? CoverUrl { get; set; }
172
  public List<BookCategoryDto> Categories { get; set; } = new();
173
  }
BlazorFrontend/Models/Dtos/LibraryDtos.cs CHANGED
@@ -41,6 +41,7 @@ namespace BlazorFrontend.Models.Dtos
41
  public int AvailableCopies { get; set; }
42
  public DateTime CreatedAt { get; set; }
43
  public DateTime? UpdatedAt { get; set; }
 
44
  public string? CoverUrl { get; set; }
45
  public List<BookCategoryDto> Categories { get; set; } = new();
46
  }
 
41
  public int AvailableCopies { get; set; }
42
  public DateTime CreatedAt { get; set; }
43
  public DateTime? UpdatedAt { get; set; }
44
+ [JsonPropertyName("coverUrl")]
45
  public string? CoverUrl { get; set; }
46
  public List<BookCategoryDto> Categories { get; set; } = new();
47
  }