diff --git a/pkg/database/sql/user.go b/pkg/database/sql/user.go
index 11718be860a23eee340db7bc8bc15046681e532f..15dbe727b355e545be8aa1eb0fff93220d505b28 100644
--- a/pkg/database/sql/user.go
+++ b/pkg/database/sql/user.go
@@ -140,6 +140,7 @@ func (self *UserRepository) Create(ctx context.Context, createUser *repository.CreateUser) (uint, error) {
user := &User{
Username: createUser.Username,
Name: createUser.Name,
+ Path: createUser.Path,
Password: string(createUser.Password),
}
diff --git a/pkg/service/auth.go b/pkg/service/auth.go
index 4358a8a6b422a441b85c61c78d13090add66fc84..761c70b4e0a416d0f556bb929318f1e1170f11c4 100644
--- a/pkg/service/auth.go
+++ b/pkg/service/auth.go
@@ -69,6 +69,7 @@
_, err = c.userRepository.Create(ctx, &repository.CreateUser{
Username: string(username),
Password: hash,
+ IsAdmin: true,
Path: string(path),
})
diff --git a/templates/register.html b/templates/register.html
deleted file mode 100644
index b026d33a60605574f7c71e79bd5fc8b555e94eb9..0000000000000000000000000000000000000000
--- a/templates/register.html
+++ /dev/null
@@ -1,28 +0,0 @@
-{{template "layout.html" .}}
-{{define "title"}} Initial Setup {{end}}
-{{define "content"}}
-<h1>Initial Setup</h1>
-<form action="/initial" method="post">
- <div class="field">
- <label class="label">Username</label>
- <div class="control">
- <input class="input" name="username" type="text">
- </div>
- </div>
- <div class="field">
- <label class="label">Password</label>
- <div class="control">
- <input class="input" name="password" type="password">
- </div>
- </div>
- <div class="field">
- <label class="label">Root folder</label>
- <div class="control">
- <input class="input" name="path" type="text">
- </div>
- </div>
- <div class="field">
- <input class="button is-pulled-right" value="Save" type="submit">
- </div>
-</form>
-{{end}}