lens @ cd1fa849fb161d3bbc7c582aa2787315a1037db1

fix: Fix path not storing properly

Also, initial user is now created as admin.
 1diff --git a/pkg/database/sql/user.go b/pkg/database/sql/user.go
 2index 11718be860a23eee340db7bc8bc15046681e532f..15dbe727b355e545be8aa1eb0fff93220d505b28 100644
 3--- a/pkg/database/sql/user.go
 4+++ b/pkg/database/sql/user.go
 5@@ -140,6 +140,7 @@ func (self *UserRepository) Create(ctx context.Context, createUser *repository.CreateUser) (uint, error) {
 6 	user := &User{
 7 		Username: createUser.Username,
 8 		Name:     createUser.Name,
 9+		Path:     createUser.Path,
10 		Password: string(createUser.Password),
11 	}
12 
13diff --git a/pkg/service/auth.go b/pkg/service/auth.go
14index 4358a8a6b422a441b85c61c78d13090add66fc84..761c70b4e0a416d0f556bb929318f1e1170f11c4 100644
15--- a/pkg/service/auth.go
16+++ b/pkg/service/auth.go
17@@ -69,6 +69,7 @@
18 	_, err = c.userRepository.Create(ctx, &repository.CreateUser{
19 		Username: string(username),
20 		Password: hash,
21+		IsAdmin:  true,
22 		Path:     string(path),
23 	})
24 
25diff --git a/templates/register.html b/templates/register.html
26deleted file mode 100644
27index b026d33a60605574f7c71e79bd5fc8b555e94eb9..0000000000000000000000000000000000000000
28--- a/templates/register.html
29+++ /dev/null
30@@ -1,28 +0,0 @@
31-{{template "layout.html" .}}
32-{{define "title"}} Initial Setup {{end}}
33-{{define "content"}}
34-<h1>Initial Setup</h1>
35-<form action="/initial" method="post">
36-    <div class="field">
37-        <label class="label">Username</label>
38-        <div class="control">
39-            <input class="input" name="username" type="text">
40-        </div>
41-    </div>
42-    <div class="field">
43-        <label class="label">Password</label>
44-        <div class="control">
45-            <input class="input" name="password" type="password">
46-        </div>
47-    </div>
48-    <div class="field">
49-        <label class="label">Root folder</label>
50-        <div class="control">
51-            <input class="input" name="path" type="text">
52-        </div>
53-    </div>
54-    <div class="field">
55-        <input class="button is-pulled-right" value="Save" type="submit">
56-    </div>
57-</form>
58-{{end}}