mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-24 14:11:29 +00:00
Implement LBP1 tags, stricter resource checking, and more (#463)
* Add LBP1 tags, more strict resource checking, and more. * Fix unit tests * Add more length checking to dependency parser * Online editor problems * Fix tests pt 2 * Self code review and fixed digest bugs * Don't add content length if it was already set * Fix status endpoint * Fix review bug and simplify review serialization * Fix a typo in review serialization * Remove duplicated code and fix search * Remove duplicate database call
This commit is contained in:
parent
58c340aff8
commit
d640c000aa
32 changed files with 735 additions and 209 deletions
|
@ -228,6 +228,20 @@ public class PhotosController : ControllerBase
|
|||
|
||||
this.database.PhotoSubjects.RemoveWhere(p => p.PhotoSubjectId == subjectId);
|
||||
}
|
||||
|
||||
HashSet<string> photoResources = new(){photo.LargeHash, photo.SmallHash, photo.MediumHash, photo.PlanHash,};
|
||||
foreach (string hash in photoResources)
|
||||
{
|
||||
if (System.IO.File.Exists(Path.Combine("png", $"{hash}.png")))
|
||||
{
|
||||
System.IO.File.Delete(Path.Combine("png", $"{hash}.png"));
|
||||
}
|
||||
if (System.IO.File.Exists(Path.Combine("r", hash)))
|
||||
{
|
||||
System.IO.File.Delete(Path.Combine("r", hash));
|
||||
}
|
||||
}
|
||||
|
||||
this.database.Photos.Remove(photo);
|
||||
await this.database.SaveChangesAsync();
|
||||
return this.Ok();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue