mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-08-11 09:13:42 -04:00
LastModified on Volumes wasn't updating, validated it does update when data is changed.
This commit is contained in:
parent
13132c25af
commit
71d3af5f52
@ -7,14 +7,14 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
|
||||
<PackageReference Include="NSubstitute" Version="4.2.2" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="1.3.0">
|
||||
<PackageReference Include="coverlet.collector" Version="3.0.3">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
|
@ -22,7 +22,7 @@ namespace API.Controllers
|
||||
const string format = "jpeg";
|
||||
|
||||
Response.AddCacheHeader(content);
|
||||
return File(content, "image/" + format);
|
||||
return File(content, "image/" + format, $"chapterId");
|
||||
}
|
||||
|
||||
[HttpGet("volume-cover")]
|
||||
@ -33,7 +33,7 @@ namespace API.Controllers
|
||||
const string format = "jpeg";
|
||||
|
||||
Response.AddCacheHeader(content);
|
||||
return File(content, "image/" + format);
|
||||
return File(content, "image/" + format, $"volumeId");
|
||||
}
|
||||
|
||||
[HttpGet("series-cover")]
|
||||
@ -44,7 +44,7 @@ namespace API.Controllers
|
||||
const string format = "jpeg";
|
||||
|
||||
Response.AddCacheHeader(content);
|
||||
return File(content, "image/" + format);
|
||||
return File(content, "image/" + format, $"seriesId");
|
||||
}
|
||||
}
|
||||
}
|
@ -47,11 +47,16 @@ namespace API.Data
|
||||
.HasForeignKey(ur => ur.RoleId)
|
||||
.IsRequired();
|
||||
}
|
||||
|
||||
|
||||
void OnEntityTracked(object sender, EntityTrackedEventArgs e)
|
||||
{
|
||||
if (!e.FromQuery && e.Entry.State == EntityState.Added && e.Entry.Entity is IEntityDate entity)
|
||||
{
|
||||
entity.Created = DateTime.Now;
|
||||
entity.LastModified = DateTime.Now;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void OnEntityStateChanged(object sender, EntityStateChangedEventArgs e)
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user