From ada62e95e2c4c9d20c3df529b37e483d6e1815c7 Mon Sep 17 00:00:00 2001 From: Asara Date: Sat, 5 Oct 2019 18:22:11 -0400 Subject: [PATCH] Update Readme, fix up auth --- README.md | 2 +- packages/auth/auth.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6dbf687..b1e58c9 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Install steps are for Debian 9 (stretch) 5. Run the application! ``` - cd ${GOPATH}/src/git.minhas.io/asara/sudoscientist + cd ${GOPATH}/src/git.minhas.io/asara/sudoscientist-go-backend for i in settings/*; do source $i; done export DB_HOST=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" sudosci-db) go get diff --git a/packages/auth/auth.go b/packages/auth/auth.go index 9c11c17..f00c447 100644 --- a/packages/auth/auth.go +++ b/packages/auth/auth.go @@ -41,8 +41,8 @@ type Claims struct { } type JWT struct { - JWT string `json:"jwt"` - Username string `json:"username"` + JWT string `json:"jwt"` + Username string `json:"username"` } func Init() { @@ -151,8 +151,8 @@ func signin(w http.ResponseWriter, r *http.Request) { } _, tokenString, _ := TokenAuth.Encode(claims) token := JWT{ - JWT: tokenString, - Username: creds.Username, + JWT: tokenString, + Username: creds.Username, } render.JSON(w, r, token) }