fix
This commit is contained in:
@@ -163,4 +163,22 @@ public class CurrencyService
|
||||
|
||||
return result.Set(_mapper.Map<CurrencyRateDto>(rate));
|
||||
}
|
||||
|
||||
public Exec<CurrencyDto, GeneralExecStatus> Remove(Guid userId, Guid id)
|
||||
{
|
||||
var result = new Exec<CurrencyDto, GeneralExecStatus>(GeneralExecStatus.success);
|
||||
|
||||
var currency = _currencyRepository.Get(userId, id);
|
||||
if (currency == null)
|
||||
{
|
||||
return result.Set(GeneralExecStatus.not_found);
|
||||
}
|
||||
|
||||
if (!_currencyRepository.Remove(currency))
|
||||
{
|
||||
return result.Set(GeneralExecStatus.failure);
|
||||
}
|
||||
|
||||
return result.Set(_mapper.Map<CurrencyDto>(currency));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user