From 27f561c3ce5e233b96da0fb554f9c48c3b0ffd31 Mon Sep 17 00:00:00 2001 From: gmemstr Date: Sun, 19 Nov 2017 11:11:46 -0800 Subject: [PATCH] Added form for adding users --- admin/admin.go | 2 +- assets/config/users.db | Bin 20480 -> 20480 bytes assets/web/static/app.js | 29 ++++++++++++++++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/admin/admin.go b/admin/admin.go index cfdc821..7dbb640 100644 --- a/admin/admin.go +++ b/admin/admin.go @@ -140,7 +140,7 @@ func EditUser() common.Handler { Message: fmt.Sprintf("error executing sqlite3 statement: %v", err), StatusCode: http.StatusInternalServerError, } - } + } } fmt.Println(hash) if bcrypt.CompareHashAndPassword([]byte(hash), []byte(password)) != nil { diff --git a/assets/config/users.db b/assets/config/users.db index e5f311a92d5c18a7a717bd1c557ecab73e8f6090..ef24a396931772c748c003255b3edb359b121dec 100644 GIT binary patch delta 205 zcmZozz}T>Wae_1>$3z)tMvjdMOZd5%`7Sf?FXGqdyS!OY;2>W@95XvZ6cCFxvWRPz zq!yQ`7$vG0n5gKbrFpqkrkJD#6{nUt6(_qyRHWyY7Q2~eCg&x3yO>*sItH19`j;66 zpeTnr2h%>0iS_`mbN=6?iKbA_LigISajWEAt}*Y+X;jLZNa1v;Pr delta 89 zcmZozz}T>Wae_1>+e8^>Mz)O!OZYjM`1Kk17xC+F7F1B?pR6x`6)5tJf&UNxx6OhM tPxvPWuucA;&mzRc#LUde$;H6Hz{LNWf&V-IYoLbv{F`6fiwH0>0RTvh7;pdp diff --git a/assets/web/static/app.js b/assets/web/static/app.js index 59d2e1d..bf81fbd 100644 --- a/assets/web/static/app.js +++ b/assets/web/static/app.js @@ -15,8 +15,13 @@ const episodepublishform = { ` } +const message = { + template: `

{{ this.$route.params.message }}

` +} + const userlist = { template: `
+ New @@ -72,6 +77,26 @@ const userlist = { } } +const usernew = { + template: `
+
+

New User

+
+ + + + + + + + + +
+ +
+
` +} + const useredit = { template: `
@@ -301,7 +326,9 @@ const routes = [ { path: '/theme', component: customcss }, { path: '/edit/:id', component: episodeedit }, { path: '/users/', component: userlist }, - { path: '/user/:id', component: useredit } + { path: '/msg/:message', component: message }, + { path: '/user/:id', component: useredit }, + { path: '/users/new', component: usernew } ] const router = new VueRouter({
Username