update
This commit is contained in:
@@ -292,8 +292,8 @@
|
||||
{
|
||||
if (motion == null)
|
||||
throw new ArgumentNullException(nameof(motion));
|
||||
if (motion.Motion == null)
|
||||
throw new ArgumentNullException(nameof(motion.Motion));
|
||||
if (motion.Item == null)
|
||||
throw new ArgumentNullException(nameof(motion.Item));
|
||||
|
||||
var result = new Exec<Motion, MotionAddResult>(MotionAddResult.success);
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
return result.Set(MotionAddResult.account_not_found);
|
||||
}
|
||||
|
||||
var itemExec = _itemService.GetOrCreate(userId, motion.Motion);
|
||||
var itemExec = _itemService.GetOrCreate(userId, motion.Item);
|
||||
if (itemExec.Status != ItemGetOrAddResult.success)
|
||||
{
|
||||
return result.Set(MotionAddResult.failure);
|
||||
@@ -341,8 +341,8 @@
|
||||
{
|
||||
if (motion == null)
|
||||
throw new ArgumentNullException(nameof(motion));
|
||||
if (motion.Motion == null)
|
||||
throw new ArgumentNullException(nameof(motion.Motion));
|
||||
if (motion.Item == null)
|
||||
throw new ArgumentNullException(nameof(motion.Item));
|
||||
|
||||
var result = new Exec<Motion, MotionUpdateResult>(MotionUpdateResult.success);
|
||||
|
||||
@@ -352,7 +352,7 @@
|
||||
return result.Set(MotionUpdateResult.not_found);
|
||||
}
|
||||
|
||||
var itemExec = _itemService.GetOrCreate(userId, motion.Motion);
|
||||
var itemExec = _itemService.GetOrCreate(userId, motion.Item);
|
||||
if (itemExec.Status != ItemGetOrAddResult.success)
|
||||
{
|
||||
return result.Set(MotionUpdateResult.failure);
|
||||
@@ -414,5 +414,10 @@
|
||||
|
||||
return result.Set(exists);
|
||||
}
|
||||
|
||||
public List<Account> FindAccounts(Guid userId, string term)
|
||||
{
|
||||
return _accountRepository.FindAccounts(userId, term);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user