Browse Source

Use captial and lower case letters and increased length to 11 for random room names.

Signed-off-by: Simon Eisenmann <simon@struktur.de>
pull/3/head
Simon Eisenmann 12 years ago committed by Simon Eisenmann
parent
commit
53143dfd41
  1. 2
      src/app/spreed-speakfreely-server/random.go
  2. 2
      src/app/spreed-speakfreely-server/rooms.go

2
src/app/spreed-speakfreely-server/random.go

@ -26,7 +26,7 @@ import (
) )
const ( const (
dict = "abcdefghijklmnopqrstuvwxyz0123456789" dict = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW0123456789"
) )
func RandomString(length int) string { func RandomString(length int) string {

2
src/app/spreed-speakfreely-server/rooms.go

@ -35,7 +35,7 @@ type Rooms struct {
func (rooms Rooms) Post(r *http.Request) (int, interface{}) { func (rooms Rooms) Post(r *http.Request) (int, interface{}) {
name := RandomString(9) name := RandomString(11)
return 200, &Room{name, fmt.Sprintf("/%s", name)} return 200, &Room{name, fmt.Sprintf("/%s", name)}
} }

Loading…
Cancel
Save