diff --git a/app/create.rb b/app/create.rb index 00061f74..9788823a 100644 --- a/app/create.rb +++ b/app/create.rb @@ -129,7 +129,16 @@ post '/create' do }) end - @site.save + begin + @site.save + rescue Sequel::UniqueConstraintViolation => e + if e.message =~ /username.+already exists/ + flash[:error] = 'Username already exists.' + return {result: 'error'}.to_json + end + + raise e + end unless education_whitelisted? @site.send_email( diff --git a/public/img/bitcoin.png b/public/img/bitcoin.png deleted file mode 100644 index e189e28b..00000000 Binary files a/public/img/bitcoin.png and /dev/null differ diff --git a/views/donate.erb b/views/donate.erb index e75edda2..2ef70402 100644 --- a/views/donate.erb +++ b/views/donate.erb @@ -34,13 +34,8 @@ -->

Bitcoin:

-

-

1MPYyfoWK8CkAzhLzLLtZGa9dwEGT5dm2T

- -

Filecoin

-

f1tub53j4dglc5bcgn2djaqljfkphiw6dem67ev2a

-

(more info about Filecoin)

+

3HPuhRTz4fMyMRaLFHEQ5E2rrxGic8CXJQ

Thanks. You are great! Now go and make an awesome web site!

- +