Fix gestione allegati e creato metodo di esportazione log
This commit is contained in:
@@ -182,6 +182,17 @@ public class IspezioniService(AppDbContext db) : IIspezioniService
|
||||
return true;
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateFileListSchedaAsync(int schedaId, List<string>? imageNames)
|
||||
{
|
||||
var scheda = await db.Schede.FirstOrDefaultAsync(x => x.Id == schedaId);
|
||||
if (scheda is null) return false;
|
||||
|
||||
scheda.ImageNames = imageNames;
|
||||
db.Schede.Update(scheda);
|
||||
await db.SaveChangesAsync();
|
||||
return true;
|
||||
}
|
||||
|
||||
public async Task<bool> DeleteSchedaAsync(int schedaId)
|
||||
{
|
||||
var scheda = await db.Schede.FirstOrDefaultAsync(x => x.Id == schedaId);
|
||||
|
||||
Reference in New Issue
Block a user