gofmt
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
0d63ab8826
commit
6fbc820db9
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
<router-link to="/authors/add" class="ui green labeled icon button" style="float: right;">
|
<router-link to="/authors/add" class="ui green labeled icon button" style="float: right;">
|
||||||
<i class="plus icon"></i>
|
<i class="plus icon"></i>
|
||||||
Add a author
|
Add a new author
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
<button @click="loadAuthors()" class="ui teal labeled icon button" style="float: right;">
|
<button @click="loadAuthors()" class="ui teal labeled icon button" style="float: right;">
|
||||||
|
|
|
@ -36,7 +36,7 @@ func AddOrUpdateBook(book Book) (newBook Book, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if !exists {
|
if !exists {
|
||||||
newPublisher, err := AddPublisher(Publisher{Name:book.PublisherFull.Name})
|
newPublisher, err := AddPublisher(Publisher{Name: book.PublisherFull.Name})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return Book{}, err
|
return Book{}, err
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ func AddOrUpdateBook(book Book) (newBook Book, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete all (maybe) previously existing author relations
|
// Delete all (maybe) previously existing author relations
|
||||||
x.Delete(AuthorBook{BookID:book.ID})
|
x.Delete(AuthorBook{BookID: book.ID})
|
||||||
|
|
||||||
// Take the authors, look if they exist, if they don't create them
|
// Take the authors, look if they exist, if they don't create them
|
||||||
authorBookRelation := make([]AuthorBook, 0)
|
authorBookRelation := make([]AuthorBook, 0)
|
||||||
|
|
|
@ -2,11 +2,11 @@ package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
"git.mowie.cc/konrad/Library/models"
|
"git.mowie.cc/konrad/Library/models"
|
||||||
"github.com/labstack/echo"
|
"github.com/labstack/echo"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
"fmt"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type authorPayload struct {
|
type authorPayload struct {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package routes
|
package routes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/md5"
|
||||||
|
"encoding/hex"
|
||||||
"git.mowie.cc/konrad/Library/models"
|
"git.mowie.cc/konrad/Library/models"
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
"github.com/labstack/echo"
|
"github.com/labstack/echo"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
"crypto/md5"
|
|
||||||
"encoding/hex"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Login is the login handler
|
// Login is the login handler
|
||||||
|
|
Loading…
Reference in New Issue