add migration versioning (#12)

This commit is contained in:
Tiger Wang (王豫)
2022-08-31 23:58:59 -04:00
committed by GitHub
parent 6c73a4be13
commit 38fee52518
8 changed files with 51 additions and 19 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ package v1
import (
json2 "encoding/json"
"io/ioutil"
"io"
"net/http"
url2 "net/url"
"os"
@@ -418,7 +418,7 @@ func PostUserCustomConf(c *gin.Context) {
model.Result{Success: common_err.USER_NOT_EXIST, Message: common_err.GetMsg(common_err.USER_NOT_EXIST)})
return
}
data, _ := ioutil.ReadAll(c.Request.Body)
data, _ := io.ReadAll(c.Request.Body)
filePath := config.AppInfo.UserDataPath + "/" + strconv.Itoa(user.Id)
file.WriteToPath(data, filePath, name+".json")