mirror of
https://github.com/JustKato/FreePad.git
synced 2026-02-24 00:00:46 +02:00
* Various tries to fix
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/JustKato/FreePad/controllers/post"
|
||||
"github.com/JustKato/FreePad/helper"
|
||||
"github.com/JustKato/FreePad/models/database"
|
||||
"github.com/JustKato/FreePad/types"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/skip2/go-qrcode"
|
||||
@@ -23,6 +24,14 @@ func ApiRoutes(route *gin.RouterGroup) {
|
||||
// Get the content of the post
|
||||
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
|
||||
myPost, err := post.Create(postName, postContent)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user