This commit is contained in:
James Cole
2020-02-13 20:09:27 +01:00
parent 8d806e6a1d
commit 529cb3d387
4 changed files with 28 additions and 0 deletions

View File

@@ -318,6 +318,10 @@ class CurrencyController extends Controller
if ($this->repository->currencyInUse($currency)) {
throw new FireflyException('200006: Currency in use.'); // @codeCoverageIgnore
}
if ($this->repository->isFallbackCurrency($currency)) {
throw new FireflyException('200026: Currency is fallback.'); // @codeCoverageIgnore
}
$this->repository->destroy($currency);
return response()->json([], 204);