mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-02 05:04:15 -04:00
Fixing the silent fail
This commit is contained in:
parent
5a1826d01d
commit
68ea76ed1c
@ -75,7 +75,7 @@ namespace Kyoo.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IRepository<T> : IDisposable, IAsyncDisposable where T : IResource
|
public interface IRepository<T> : IDisposable, IAsyncDisposable where T : class, IResource
|
||||||
{
|
{
|
||||||
Task<T> Get(int id);
|
Task<T> Get(int id);
|
||||||
Task<T> Get(string slug);
|
Task<T> Get(string slug);
|
||||||
@ -93,11 +93,11 @@ namespace Kyoo.Controllers
|
|||||||
|
|
||||||
Task<T> Create([NotNull] T obj);
|
Task<T> Create([NotNull] T obj);
|
||||||
Task<T> CreateIfNotExists([NotNull] T obj);
|
Task<T> CreateIfNotExists([NotNull] T obj);
|
||||||
Task<T> CreateIfNotExists([NotNull] T obj, bool silentFail)
|
async Task<T> CreateIfNotExists([NotNull] T obj, bool silentFail)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return CreateIfNotExists(obj);
|
return await CreateIfNotExists(obj);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user