* Various tries to fix

This commit is contained in:
Daniel Legt 2022-05-18 22:49:18 +03:00
parent 961c12b000
commit 2d7d6a2f8b
2 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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 {