mirror of
https://gitee.com/goploy/goploy.git
synced 2024-12-02 04:07:33 +08:00
fix required field zero value issue
This commit is contained in:
parent
c5e6007db7
commit
6df673b5ae
@ -7,6 +7,14 @@ package project
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"os/exec"
|
||||||
|
"path"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/zhenorzz/goploy/cmd/server/api"
|
"github.com/zhenorzz/goploy/cmd/server/api"
|
||||||
"github.com/zhenorzz/goploy/cmd/server/api/middleware"
|
"github.com/zhenorzz/goploy/cmd/server/api/middleware"
|
||||||
"github.com/zhenorzz/goploy/config"
|
"github.com/zhenorzz/goploy/config"
|
||||||
@ -17,13 +25,6 @@ import (
|
|||||||
"github.com/zhenorzz/goploy/internal/server"
|
"github.com/zhenorzz/goploy/internal/server"
|
||||||
"github.com/zhenorzz/goploy/internal/server/response"
|
"github.com/zhenorzz/goploy/internal/server/response"
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
"io"
|
|
||||||
"net/http"
|
|
||||||
"os"
|
|
||||||
"os/exec"
|
|
||||||
"path"
|
|
||||||
"strconv"
|
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Project api.API
|
type Project api.API
|
||||||
@ -667,7 +668,7 @@ func (Project) Remove(gp *server.Goploy) server.Response {
|
|||||||
// @Router /project/uploadFile [post]
|
// @Router /project/uploadFile [post]
|
||||||
func (Project) UploadFile(gp *server.Goploy) server.Response {
|
func (Project) UploadFile(gp *server.Goploy) server.Response {
|
||||||
type ReqData struct {
|
type ReqData struct {
|
||||||
ProjectFileID int64 `schema:"projectFileId" validate:"required,gte=0"`
|
ProjectFileID int64 `schema:"projectFileId" validate:"gte=0"`
|
||||||
ProjectID int64 `schema:"projectId" validate:"required,gt=0"`
|
ProjectID int64 `schema:"projectId" validate:"required,gt=0"`
|
||||||
Filename string `schema:"filename" validate:"required"`
|
Filename string `schema:"filename" validate:"required"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user