feat: moving notifications

This commit is contained in:
Chubby Granny Chaser 2024-06-05 14:18:40 +01:00
parent d6e57c20c7
commit ef036d6f57
No known key found for this signature in database
17 changed files with 179 additions and 87 deletions

View file

@ -52,19 +52,22 @@ export const fetchDownloadSourcesAndUpdate = async () => {
await dataSource.transaction(async (transactionalEntityManager) => {
for (const result of results) {
await transactionalEntityManager.getRepository(DownloadSource).update(
{ id: result.id },
{
etag: result.etag,
status: result.status,
}
);
if (result.etag !== null) {
await transactionalEntityManager.getRepository(DownloadSource).update(
{ id: result.id },
{
etag: result.etag,
status: result.status,
downloadCount: result.downloads.length,
}
);
await insertDownloadsFromSource(
transactionalEntityManager,
result,
result.downloads
);
await insertDownloadsFromSource(
transactionalEntityManager,
result,
result.downloads
);
}
}
await RepacksManager.updateRepacks();