password auth fix

pull/99/head v0.79.82
Hunter Long 2018-11-16 00:34:22 -08:00
parent 41e35ae444
commit 47bf0f379a
4 changed files with 5 additions and 6 deletions

View File

@ -1,4 +1,4 @@
VERSION=0.79.81
VERSION=0.79.82
BINARY_NAME=statup
GOPATH:=$(GOPATH)
GOCMD=go

View File

@ -58,11 +58,10 @@ $('.test_notifier').on('click', function(e) {
e.preventDefault();
});
$('form').submit(function() {
// Spinner($(this).find('button[type=submit]'))
$('.spin_form').on('submit', function() {
Spinner($(this).find('button[type=submit]'));
});
function Spinner(btn, off = false) {
btn.prop('disabled', !off);
if (off) {

View File

@ -10,7 +10,7 @@
Incorrect login information submitted, try again.
</div>
{{ end }}
<form action="/dashboard" method="POST">
<form action="/dashboard" class="spin_form" method="POST">
<div class="form-group row">
<label for="username" class="col-sm-2 col-form-label">Username</label>
<div class="col-sm-10">

View File

@ -23,7 +23,7 @@ import (
type User struct {
Id int64 `gorm:"primary_key;column:id" json:"id"`
Username string `gorm:"type:varchar(100);unique;column:username;" json:"username,omitempty"`
Password string `gorm:"column:password" json:"-"`
Password string `gorm:"column:password" json:"password,omitempty"`
Email string `gorm:"type:varchar(100);unique;column:email" json:"email,omitempty"`
ApiKey string `gorm:"column:api_key" json:"api_key,omitempty"`
ApiSecret string `gorm:"column:api_secret" json:"api_secret,omitempty"`