great
This commit is contained in:
parent
66884c64bb
commit
4b8230c1ff
18 changed files with 29 additions and 23 deletions
|
|
@ -4,7 +4,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/Bronku/iroon/models"
|
||||
"github.com/Bronku/cake-order-tracker/models"
|
||||
)
|
||||
|
||||
func (s *Store) cakeCount() int {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package store
|
|||
import (
|
||||
"embed"
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"log"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
|
@ -27,6 +28,11 @@ func (s *Store) loadFile(file string) {
|
|||
if err != nil {
|
||||
log.Fatal("error executing migration: ", file, err)
|
||||
}
|
||||
|
||||
_, err = s.db.Exec(fmt.Sprintf("PRAGMA user_version = %d;", version))
|
||||
if err != nil {
|
||||
log.Fatal("error setting user_version:", err)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Store) loadMigrations() {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/Bronku/iroon/models"
|
||||
"github.com/Bronku/cake-order-tracker/models"
|
||||
)
|
||||
|
||||
// #todo update labels in templates
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package store
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/Bronku/iroon/models"
|
||||
"github.com/Bronku/cake-order-tracker/models"
|
||||
)
|
||||
|
||||
func (s *Store) AddSession(token, userName string, expiration time.Time) error {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql"
|
||||
"log"
|
||||
|
||||
"github.com/Bronku/iroon/models"
|
||||
"github.com/Bronku/cake-order-tracker/models"
|
||||
_ "github.com/knaka/go-sqlite3-fts5"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/Bronku/iroon/models"
|
||||
"github.com/Bronku/cake-order-tracker/models"
|
||||
)
|
||||
|
||||
func TestStore(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package store
|
|||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/Bronku/iroon/crypto"
|
||||
"github.com/Bronku/iroon/models"
|
||||
"github.com/Bronku/cake-order-tracker/crypto"
|
||||
"github.com/Bronku/cake-order-tracker/models"
|
||||
)
|
||||
|
||||
func (s *Store) AddUser(login, password string) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue