almost there but tasks dont disappear in UI and click&drag doesnt work

This commit is contained in:
Bel LaPointe
2019-11-14 14:25:16 -07:00
parent cf1fd1dfed
commit b6397a71d4
11 changed files with 325 additions and 153 deletions

15
server/ajax/form/uuid.go Normal file
View File

@@ -0,0 +1,15 @@
package form
import (
"fmt"
"hash/fnv"
"github.com/google/uuid"
)
func NewUUID() string {
uuid := uuid.New().String()
h := fnv.New32a()
h.Write([]byte(uuid))
return fmt.Sprint(h.Sum32())
}

View File

@@ -0,0 +1,20 @@
package form
import (
"strconv"
"testing"
)
func TestUUID(t *testing.T) {
seen := map[string]struct{}{}
for i := 0; i < 50; i++ {
v := NewUUID()
if _, ok := seen[v]; ok {
t.Error(ok)
}
if _, err := strconv.Atoi(v); err != nil {
t.Error(err)
}
seen[v] = struct{}{}
}
}