1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00

Account controller

This commit is contained in:
David Bomba 2023-04-29 16:19:41 +10:00
parent 06e2bcbf83
commit 2624c97935

View File

@ -47,13 +47,13 @@ class CreateAccount
public function handle()
{
// if (config('ninja.environment') == 'selfhost' && Account::count() == 0) {
// return $this->create();
// } elseif (config('ninja.environment') == 'selfhost' && Account::count() > 1) {
// return response()->json(['message' => Ninja::selfHostedMessage()], 400);
// } elseif (! Ninja::boot()) {
// return response()->json(['message' => Ninja::parse()], 401);
// }
if (config('ninja.environment') == 'selfhost' && Account::count() == 0) {
return $this->create();
} elseif (config('ninja.environment') == 'selfhost' && Account::count() > 1) {
return response()->json(['message' => Ninja::selfHostedMessage()], 400);
} elseif (! Ninja::boot()) {
return response()->json(['message' => Ninja::parse()], 401);
}
return $this->create();
}