feat: import Sea vHost single-server testing release
This commit is contained in:
commit
248badd33e
441 files changed
+63221
No files matched your search
@@ -0,0 +1,3 @@
|
||||
package httpapi
|
||||
import("net/http";"strconv")
|
||||
func(s *Server)manageFTP(w http.ResponseWriter,r *http.Request){id,_:=projectID(r);var input struct{Action string `json:"action"`};if decodeJSON(r,&input)!=nil{writeError(w,400,"操作格式无效");return};password,e:=s.projects.ManageFTP(r.Context(),currentUser(r),id,input.Action);u:=currentUser(r);s.store.Log(r.Context(),u.TenantID,u.ID,input.Action,"ftp",strconv.FormatUint(id,10),requestClientIP(r),e==nil,"管理主机 FTP:"+input.Action);if e!=nil{writeError(w,422,e.Error());return};writeJSON(w,200,map[string]any{"password":password})}
|
||||
Reference in new issue
Block a user