mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-30 19:54:16 -04:00
Remove useless status check of the seach manager
This commit is contained in:
parent
320c45096b
commit
eec08d4a3e
@ -70,7 +70,7 @@ public class SearchManager : ISearchManager
|
|||||||
IRepository<Studio>.OnDeleted += (x) => _Delete(nameof(Studio), x.Id);
|
IRepository<Studio>.OnDeleted += (x) => _Delete(nameof(Studio), x.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task CreateOrUpdate(string index, IResource item, string? kind = null)
|
public Task CreateOrUpdate(string index, IResource item, string? kind = null)
|
||||||
{
|
{
|
||||||
if (kind != null)
|
if (kind != null)
|
||||||
{
|
{
|
||||||
@ -81,11 +81,9 @@ public class SearchManager : ISearchManager
|
|||||||
dictionary.Add(CamelCase.ConvertName(property.Name), property.GetValue(item));
|
dictionary.Add(CamelCase.ConvertName(property.Name), property.GetValue(item));
|
||||||
dictionary.Add("ref", $"{kind}-{item.Id}");
|
dictionary.Add("ref", $"{kind}-{item.Id}");
|
||||||
expando.kind = kind;
|
expando.kind = kind;
|
||||||
var task = await _client.Index(index).AddDocumentsAsync(new[] { expando });
|
return _client.Index(index).AddDocumentsAsync(new[] { expando });
|
||||||
var ret = await _client.WaitForTaskAsync(task.TaskUid);
|
|
||||||
Console.WriteLine(ret.Error);
|
|
||||||
}
|
}
|
||||||
await _client.Index(index).AddDocumentsAsync(new[] { item });
|
return _client.Index(index).AddDocumentsAsync(new[] { item });
|
||||||
}
|
}
|
||||||
|
|
||||||
private Task _Delete(string index, int id, string? kind = null)
|
private Task _Delete(string index, int id, string? kind = null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user