diff options
Diffstat (limited to 'app/test.go')
| -rw-r--r-- | app/test.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/test.go b/app/test.go index 3181eb4..331dad5 100644 --- a/app/test.go +++ b/app/test.go @@ -1,7 +1,8 @@ package main import ( -//"encoding/json" + //"encoding/json" + "log" ) func insertHost() { @@ -21,3 +22,12 @@ func insertHost() { c.Do("SET", cache_prefix, js) */ } + +func insertAdmin() { + password, err := HashPassword("password") + if err != nil { + log.Panic(err) + } + u := User{Name: "admin", Email: "root@localhost", Password: password} + Db.Create(&u) +} |
