fix:合图调整
This commit is contained in:
1
server/upload/.gitignore
vendored
Normal file
1
server/upload/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
upload
|
||||
@@ -32,7 +32,7 @@ func NewUploadQrcodeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Uplo
|
||||
|
||||
func (l *UploadQrcodeLogic) UploadQrcode(req *types.UploadQrcodeReq, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
if userinfo.GetIdType() != auth.IDTYPE_User {
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "please login first")
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "please sign in first")
|
||||
}
|
||||
if req.Url == "" {
|
||||
resp.SetStatus(basic.CodeApiErr, "param url is empty")
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"fusenapi/server/upload/internal/handler"
|
||||
"fusenapi/server/upload/internal/svc"
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/fsconfig"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/conf"
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
@@ -19,8 +20,9 @@ var configFile = flag.String("f", "etc/upload.yaml", "the config file")
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
cfgContent := fsconfig.StartNacosConfig(*configFile, nil)
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.LoadConfigFromYamlBytes([]byte(cfgContent), &c)
|
||||
|
||||
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user