mirror of
https://gitee.com/goploy/goploy.git
synced 2024-12-01 19:57:34 +08:00
namespace set default 0
This commit is contained in:
parent
730c310e2d
commit
df3f4d749e
@ -37,7 +37,7 @@ func (u User) Handler() []server.Route {
|
||||
server.NewRoute("/user/add", http.MethodPost, u.Add).Permissions(config.AddMember).LogFunc(middleware.AddOPLog),
|
||||
server.NewRoute("/user/edit", http.MethodPut, u.Edit).Permissions(config.EditMember).LogFunc(middleware.AddOPLog),
|
||||
server.NewRoute("/user/remove", http.MethodDelete, u.Remove).Permissions(config.DeleteMember).LogFunc(middleware.AddOPLog),
|
||||
server.NewWhiteRoute("/user/mediaLogin", http.MethodPost, u.MediaLogin),
|
||||
server.NewWhiteRoute("/user/mediaLogin", http.MethodPost, u.MediaLogin).LogFunc(middleware.AddLoginLog),
|
||||
server.NewWhiteRoute("/user/getMediaLoginUrl", http.MethodGet, u.GetMediaLoginUrl),
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
ALTER TABLE `project`
|
||||
MODIFY COLUMN `after_deploy_script_mode` varchar(20) NOT NULL DEFAULT '' COMMENT 'deprecated after v1.15.0' AFTER `review_url`,
|
||||
MODIFY COLUMN `after_deploy_script` text NOT NULL COMMENT 'deprecated after v1.15.0' AFTER `after_deploy_script_mode`,
|
||||
MODIFY COLUMN `after_deploy_script` text COMMENT 'deprecated after v1.15.0' AFTER `after_deploy_script_mode`,
|
||||
MODIFY COLUMN `after_pull_script_mode` varchar(20) NOT NULL DEFAULT '' COMMENT 'deprecated after v1.15.0' AFTER `after_deploy_script`,
|
||||
MODIFY COLUMN `after_pull_script` text NOT NULL COMMENT 'deprecated after v1.15.0' AFTER `after_pull_script_mode`,
|
||||
MODIFY COLUMN `after_pull_script` text COMMENT 'deprecated after v1.15.0' AFTER `after_pull_script_mode`,
|
||||
ADD COLUMN `script` json NOT NULL COMMENT 'script' AFTER `review_url`;
|
||||
|
||||
UPDATE project
|
||||
|
@ -94,10 +94,13 @@ func (rt *Router) doRequest(w http.ResponseWriter, r *http.Request) (*Goploy, Re
|
||||
if namespaceIDRaw == "" {
|
||||
namespaceIDRaw = r.URL.Query().Get(config.NamespaceHeaderName)
|
||||
}
|
||||
|
||||
namespaceID, err := strconv.ParseInt(namespaceIDRaw, 10, 64)
|
||||
if err != nil {
|
||||
return gp, response.JSON{Code: response.Deny, Message: "Invalid namespace"}
|
||||
var namespaceID int64
|
||||
if namespaceIDRaw != "" {
|
||||
_id, err := strconv.ParseInt(namespaceIDRaw, 10, 64)
|
||||
if err != nil {
|
||||
return gp, response.JSON{Code: response.Deny, Message: "Invalid namespace"}
|
||||
}
|
||||
namespaceID = _id
|
||||
}
|
||||
|
||||
apiKey := r.Header.Get(config.ApiKeyHeaderName)
|
||||
|
Loading…
Reference in New Issue
Block a user