mirror of https://github.com/JustKato/FreePad.git
* Various tries to fix
This commit is contained in:
parent
961c12b000
commit
2d7d6a2f8b
|
@ -1,6 +1,6 @@
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
LABEL version="1.4.0"
|
LABEL version="1.5.1"
|
||||||
|
|
||||||
# Copy the distribution files
|
# Copy the distribution files
|
||||||
COPY ./dist /app
|
COPY ./dist /app
|
||||||
|
|
|
@ -7,6 +7,7 @@ import (
|
||||||
|
|
||||||
"github.com/JustKato/FreePad/controllers/post"
|
"github.com/JustKato/FreePad/controllers/post"
|
||||||
"github.com/JustKato/FreePad/helper"
|
"github.com/JustKato/FreePad/helper"
|
||||||
|
"github.com/JustKato/FreePad/models/database"
|
||||||
"github.com/JustKato/FreePad/types"
|
"github.com/JustKato/FreePad/types"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/skip2/go-qrcode"
|
"github.com/skip2/go-qrcode"
|
||||||
|
@ -23,6 +24,14 @@ func ApiRoutes(route *gin.RouterGroup) {
|
||||||
// Get the content of the post
|
// Get the content of the post
|
||||||
postContent := ctx.PostForm("content")
|
postContent := ctx.PostForm("content")
|
||||||
|
|
||||||
|
// Try and run migrations
|
||||||
|
err := database.MigrateMysql()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("Error")
|
||||||
|
fmt.Println(err)
|
||||||
|
fmt.Println("Error")
|
||||||
|
}
|
||||||
|
|
||||||
// Create my post
|
// Create my post
|
||||||
myPost, err := post.Create(postName, postContent)
|
myPost, err := post.Create(postName, postContent)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue