mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2025-12-27 16:08:08 -05:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7d2ec7311 | ||
|
|
bb9ac5b67b |
@@ -593,7 +593,10 @@ public class ConfigurationController : ControllerBase
|
||||
return BadRequest("Provider name is required");
|
||||
}
|
||||
|
||||
var duplicateConfig = await _dataContext.NotificationConfigs.CountAsync(x => x.Name == updatedProvider.Name);
|
||||
var duplicateConfig = await _dataContext.NotificationConfigs
|
||||
.Where(x => x.Id != id)
|
||||
.Where(x => x.Name == updatedProvider.Name)
|
||||
.CountAsync();
|
||||
|
||||
if (duplicateConfig > 0)
|
||||
{
|
||||
@@ -699,7 +702,10 @@ public class ConfigurationController : ControllerBase
|
||||
return BadRequest("Provider name is required");
|
||||
}
|
||||
|
||||
var duplicateConfig = await _dataContext.NotificationConfigs.CountAsync(x => x.Name == updatedProvider.Name);
|
||||
var duplicateConfig = await _dataContext.NotificationConfigs
|
||||
.Where(x => x.Id != id)
|
||||
.Where(x => x.Name == updatedProvider.Name)
|
||||
.CountAsync();
|
||||
|
||||
if (duplicateConfig > 0)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
@@ -52,7 +52,6 @@ namespace Cleanuparr.Persistence.Migrations.Data
|
||||
datetime('now') AS updated_at
|
||||
FROM notifiarr_configs
|
||||
WHERE
|
||||
(on_failed_import_strike = 1 OR on_stalled_strike = 1 OR on_slow_strike = 1 OR on_queue_item_deleted = 1 OR on_download_cleaned = 1 OR on_category_changed = 1) AND
|
||||
channel_id IS NOT NULL AND channel_id != '' AND api_key IS NOT NULL AND api_key != ''
|
||||
""");
|
||||
|
||||
@@ -75,7 +74,6 @@ namespace Cleanuparr.Persistence.Migrations.Data
|
||||
datetime('now') AS updated_at
|
||||
FROM apprise_configs
|
||||
WHERE
|
||||
(on_failed_import_strike = 1 OR on_stalled_strike = 1 OR on_slow_strike = 1 OR on_queue_item_deleted = 1 OR on_download_cleaned = 1 OR on_category_changed = 1) AND
|
||||
key IS NOT NULL AND key != '' AND full_url IS NOT NULL AND full_url != ''
|
||||
""");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user